TinyUSB: Audio on an RP2040 in Arduino

When I first had a look at implementing an Audio USB device for the RP2040 with TinyUSB, I could make things work, but taking up the task to make this work in Arduino was too big. Then Adafruit released their TinyUSB for Arduino that was quite nicely integrated into the RP2040 Arduino core of Earle Phil Hower. I was hoping that Adafruit would provide some audio implementation with examples. Since this did not happen, I Read more…

Arduino AudioTools V1.0.0

I finally managed to release the 1.0 version of my Arduino AudioTools library. It contains all the functionality that I have initially planned for and compared to the 0.9.9 release consists of a major restructuring of the source code directory. I was conducting a poll, to confirm if I should go ahead with this change and a majority of users agreed to have this implemented. Here is the new directory structure: All the core functionality Read more…

Testing I2S on a STM32H7

In my last blogs, I introduced you to the powerfull STM32H743VIT6 microcontroller and demonstrated the analog and PWM audio output using the Arduino Audio Tools library. I finally managed to extend the stm32-i2s library and so it the time now that I can demonstrate that we can also use I2s as well: I am using the demo sketch from the AudioTools w/o any changes: #include “AudioTools.h” AudioInfo info(44100, 2, 16); SineWaveGenerator<int16_t> sineWave(32000); GeneratedSoundStream<int16_t> sound(sineWave); I2SStream Read more…

Testing the Audio PWM output on a STM32H7

In my last blog, I described the analog audio output using the Arduino Audio Tools library: The STM32H743VIT6 microcontroller is quite powerful but we only have max 2 DAC pins available! This restriction falls when we use PWM: We use a PWM frequency above the hearing range (30khz) and modulate the PWM Duty Cycle with the audio signal. Compared to the demo pwm sine example, I increased the sample rate to 44100 and the channels Read more…

Analog Audio Output on an STM32H7

In my last post, I have introduced you to the powerful STM32H743VIT6 microcontroller. Now it is time to test some audio output. I don’t have any special implementation for the output of analog audio for the STM32H7, but I decided to try to use my generic implementation that is part of by my AudioTools library which is based on the Arduino analogWrite() in combination with a timer. I adapted the standard example to use stereo Read more…

The Power of STM32H7 Microcontrollers

There are different cheap but powerful Chinese development boards with different STM32H7 chips from DevEBox and WeAct. STM32H750VBT6 – 128K flash STM32H743VIT6 – 2048K flash I recommend to use the STM32H743VIT6 with the 2MB of flash memory. Please note that this is still only half of what you get with an ESP32 but you get an SD drive and 8MB SPI/QSPI Flash! The STM32H7XX processors are based on the 32-bit Arm Cortex®-M7 core, running at Read more…

Arduino Audio Tools: Introducing Pipelines

Currently it is already possible in the Arduino AudioTools Library to define some processing chains: Audio Objects are connected to other objects e.g. by adding the dependent object as parameter in the constructor. Since the very beginning of the library, I planned to have some Pipeline class that would help to define such chains in a more intuitive way. I finally committed this functionality to the Github. Further information can be found in the Wiki

ESP32-A2DP: Redesigning the I2S output

I am providing a Bluetooth A2DP audio library for the ESP32, which can receive audio from a Bluetooth Source (e.g. a mobile phone) and play it via the I2S API provided by the IDF framework. Unfortunately Espressif has decided to go for a completely new I2S API which means that my integration needs to be rewritten. For quite some time now, I am supporting this new API via my AudioTools library, and I was considering Read more…

Arduino Audio Tools: Using Tasks

So far I have always used the Arduino loop to do the audio processing with the hint, that there must not be any longer delay added to the processing. If you have some blocking functions in the loop, the solution is to run the audio in a separate task. I have added some nice concurrency C++ classes to my framework which help that we can keep the sketch quite short. Arduino Example Sketch I am Read more…

Libhelix – Behind the Scene

I am providing an Arduino MP3 and AAC decoder library for Arduino which is based on libhelix. In this library I added a simple Arduino inspired C++ API. This was one of my first libraries and I found my implementation quite confusing. So it was time to do some refactoring to clean things up. After all, the C API should be quite easy to use and there must be some reason why I ended up Read more…