# Presto with IOExpander PIN\_OUt to LED

**URL:** https://forums.pimoroni.com/t/presto-with-ioexpander-pin-out-to-led/27808
**Category:** Projects
**Created:** [May 22, 2025, 12:52am UTC](https://forums.pimoroni.com/t/presto-with-ioexpander-pin-out-to-led/27808 "2025-05-22T00:52:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![paulsk](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/paulsk/32/7590_2.png) [@paulsk](https://forums.pimoroni.com/u/paulsk)
#### Post date: [May 22, 2025, 12:52am UTC](https://forums.pimoroni.com/t/presto-with-ioexpander-pin-out-to-led/27808/1 "2025-05-22T00:52:17Z")

</div>

Hi Members,  
I just published a new [repo](https://github.com/PaulskPt/Presto_w_IOExpander_PIN_OUT_to_LED)

Purpose: controlling a 3-in-1 LED or 3 separate LEDs from a MicroPython script running on a Pimoroni Presto. Control of the LEDs via I2C to a Pimoroni Breakout Garden IOExpander (PIM 517) on a Pimoroni Breakout Garden Adapter (PIM 571).

---

<div class="post-metadata">

### Author: ![DieterCarbon](https://avatars.discourse-cdn.com/v4/letter/d/ba8739/32.png) [@DieterCarbon](https://forums.pimoroni.com/u/DieterCarbon)
#### Post date: [May 22, 2025, 8:35am UTC](https://forums.pimoroni.com/t/presto-with-ioexpander-pin-out-to-led/27808/2 "2025-05-22T08:35:45Z")

</div>

Dear Paulsk,

You are the missing link I’ve been looking for!

I truly appreciate the _Presto_ format and am currently exploring its capabilities for a project called **PrOLeT…** (_Presto Online Learning Tool No. xyz_)—designed for both self-paced and guided learning.

In this context, having an option for **acoustic feedback** —e.g., flexible tone generation via PWM or MP3 output—would be extremely valuable.

Do you see any possibility to use or adapt your **IOExpander** model for this purpose?

Any advice or suggestions would be greatly appreciated.

Many thanks in advance!

---

<div class="post-metadata">

### Author: ![paulsk](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/paulsk/32/7590_2.png) [@paulsk](https://forums.pimoroni.com/u/paulsk)
#### Post date: [May 22, 2025, 10:36am UTC](https://forums.pimoroni.com/t/presto-with-ioexpander-pin-out-to-led/27808/3 "2025-05-22T10:36:21Z")

</div>

Hi DieterCarbon,  
Thank you for your nice response.  
To make a long story short: yes, I think it will be possible to create a kind of acoustic feedback using the Presto. How to do? I don’t know yet. I am going to investigate and try in the coming week or so.

I started this project because my intention was to create an alternative for the weak buzzer signals the Presto has. This first project using a Pimoroni Breakout Garden IOExpander in combo with a Pimoroni Presto is my first attempt to do such thing with a Presto. My intention was also to send tones and/or music (could be MP3) via the IOExpander to a Pimoroni Pirate Audio with Lineout (PIM 483) that I just have in the house. A better option, I think, would be the Pirate Audio 3W stereo output (PIM484). There is a nice [article](https://learn.pimoroni.com/article/getting-started-with-pirate-audio) (the link I found on Pimoroni’s webpage for the PIM484). Unfortunately this and the Pirate Audio Speaker (1W) (PIM485) are sold out.

The problem I encountered to interface the PIM483, using the Breakout Garden IOExpander and the Breakout Garden ADAPTER, is that Pimoroni has a lot of libraries for the Breakout Garden hardware however the “pieces” that I needed were, AFAIK, not for MicroPython or called libraries like in the original rgbled.py, which started with an import of the colorsys module, which on its part called for a strain of C-libraries. So, in rgbled.py, i kicked out the all references to the colorsys module.

So, my next step will be to try go get audio into the PIM483. The LINE OUT I will connect to an audio system with a 3-channel audio mixer that I use for my computers.

By the way: the IOExpander pins 1, 3 and 5 that I am using in this repo to drive the LEDs are PWM pins. I don’t know if you already saw the question/discussion from @Tonygo2 [PRESTO with IO Expander - PWM and ADC advice](https://forums.pimoroni.com/t/presto-with-io-expander-pwm-and-adc-advice/27313). However this is also about driving LEDs as far as I read. and understand it.

The (little) problem I faced was that the libraries for older examples to use the Breakout Garden group of devices use a bit of different names for certain class methods. The nice thing is that the firmware for the Presto already has built-in modules like:

```auto
from pimoroni_i2c import PimoroniI2C
from breakout_ioexpander import BreakoutIOExpander

```

I already created an alternative by sending a “command” in the form of an impulse to a M5Stack M5Echo (speaker) device which on its turn produced beep tones, however this I did not publish (yet). For the M5Echo I wrote a sketch in Arduino C++.

Regards,  
Paulsk
