Arduino Audio Tools: UNO R4 & VS1053 MP3 Shield

Today I was receiving my ordered VS1053 MP3 Shield and I was curious about it’s integration with my Arduino Audio Tools Library using the Arduino UNO R4. MP3 Streaming The first thing I tried was the MP3 Streaming sketch. It was working – a kind of. Unfortunately the WIFI is providing the data not fast enough, so it is breaking up badly. What a disappointment: the same sketch is running perfectly on different ESP32 variants Read more…

Arduino UNO R4 – Bar Charts on the LED Matrix

We can try to use a “Bar Chart” to display the result of FFT or the volume, so it is time to have a look at the built in LED Matrix. The basic API to update an LED is as follows: The LED API – Introduction #include “Arduino_LED_Matrix.h” ArduinoLEDMatrix matrix; uint8_t frame[8][12] = {0}; void setup(){ matrix.begin(); frame[7][0] = true; // acivate LED at 0,7 (left lower corner) matrix.renderBitmap(frame, 8, 12); } void loop(){} I have Read more…

Arduino UNO R4: FFT using CMSIS DSP

In my Arduino Audio Tools library I am providing a common API to do FFT against different implementations. I was already testing some of the implementations. On ARM microcontrollers we can use the CMSIS DSP library which usually comes automatically with the Arduino Core. This is not the case for the Arduino UNO R4, but we can install the Arduino CMSIS DSP library with the Arduino library manager. Here is the adapted test sketch that Read more…

ESP32: Mixing A2DP with a Sine Signal

Today I got very upset by a discussion where a user replaced the original question with a misleading conclusion that mixing an A2DP sink with a sine signal was not possible! Unfortunately he also ignored some helpful comments by some other users. So in order to avoid any confusion I had to delete the whole discussion! Mixing the output from an A2DP sink with a sine signal can be done not only very easily but Read more…

Under the Hood: Arduino UNO R4 – Timers

I was wondering how to use the timers in the new Arduino UNO R4. Unfortunately I did not find any documentation, so I decided to document my findings here. The UNO R4 has two timer peripherals: the General PWM Timer (GPT) and the Asynchronous General Purpose Timer (AGT). There are only 2 16 bit AGT timers (but one is already used to provide the Arduino millis() and microseconds() methods) and there are 7 GPT timers Read more…

Under the Hood: Arduino UNO R4 – PWM

In Arduino we can use the analogWrite(pin, value) method to create a PWM signal on the digital pins. The value parameter is used to change the duty cycle but the PWM frequency which is fixed at usually 490 Hz and can not be changed. Here is a simple example sketch that also works with the UNO R4: void setup() { pinMode(D2, OUTPUT); // set 100% analogWrite(D2,255) } void loop() {} Fortunately the Arduino UNO R4 Read more…

Arduino UNO R4 with an Analog Microphone

The easiest way to “record” audio with an Arduino UNO R4 is by using an analog microphone which can be connected to any analog pin. For my test I was using a MCP6022 Microphone Sensor. Arduino Sketch There are no surprises here because we can use the AnalogAudioStream as audio source: #include “AudioTools.h” AnalogAudioStream in; AudioInfo info(8000, 1, 16); CsvOutput<int16_t> out(Serial); // ASCII output stream StreamCopy copier(out, in); // copy i2sStream to CsvOutput // Arduino Read more…

Audio with the new Arduino UNO R4

This week I received a brand new Arduino UNO R4 in my mail.It uses a Renesas 32 bit microprocessor and has 256 kB Flash and 32 kB RAM. It provides 1 DAC and 6 PWM pins. I got the version which also provides WIFI and a LED matrix. Unfortunately there is no I2S support, but nevertheless I was wondering if I could get some audio from it. I extended my AudioTools Library by implementing a Read more…

Arduino 2.0: RP2040 Debugging with Linux

I thought it should be quite easy to use the new debugging functionality of Arduino 2.0 with the RP2040 using the official RP2040 debug probe in Earle Phil Hower’s core. I am using Arduino on my old Macbook running Linux: And Boy was I wrong! The first challenge was to figure out the correct wiring: The UART from the Debug Probe optinally goes to the UART and a GND pin of the RP2040. Here the Read more…