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 (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. 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:
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