arduino-snapclient with Rasperry Pico 2 W

I was wondering if the Raperry Pico 2W can be used with my Arduino Snapclient Library. A related discussion was hinting that it is just not powerful enough. In the beginning was stuggeling quite a bit and the audio with Opus was just not working and I could bareliy make it work with PCM/WAV with a sample rate of only 8000. The solution was to split up the Wifi and the audio decoding to the Read more…

TinyUSB: the RP2040 I2S Output Challange

The starting point for writing audio data from USB to I2S using a Rasperry Pico (RP2040) Microcontroller is the speaker example sketch from my extended TinyUSB library. We would just do an i2s.write(data, len) in the callback: Unfortunately this did not work and this was locking up the output quite quickly. In the next trial, I was writing the data to a queue and do the i2s output in the loop(): still no success. The Read more…

Rasperry Picco 2W – Testing Streaming Audio to I2S

Today I found the time to test some audio on the Rasperry Pico 2W Microcontroller. I tried out the standard Interenet Streaming sketch from the Audio Tools examples. Unfortunatly, I noticed that the regular WiFi login logic is quite unreliable, but using the WiFiMulti works each time. Here is the adapted version: #include “AudioTools.h” #include “AudioTools/AudioCodecs/CodecMP3Helix.h” #include <WiFiMulti.h> const char *ssid = “ssid”; const char *pwd = “password”; WiFiMulti wifiMulti; URLStream url; I2SStream i2s; // Read more…

Arduino AudioTools: Streaming audio via http post

In my Arduino AudioTools project I am providing many examples that show how to distribute audio over the network. One scenario that is easy to implement, is to write the data via http post. On the server side usually one of the following options is expected: the content length and we can just write the audio data to the stream after the http header no content length, adding transfer-encoding: chunked to the post header and Read more…

Arduino AudioTools: Audio Number Type Conversion on Stereoids

I am providing the untyped NumberFormatConverterStream class to convert between different signed bit sizes. This class is using the typed templated NumberFormatConverterStreamT do do the actual work. Currently there are also some Codecs that can also be used to convert the nubmer format: e.g. L8, L16 and Float. I decided to extend the functionality of NumberFormatConverterStreamT to potentially support any number type, so that we can also use unsigned data types for the conversion as Read more…

The ESP32 I2S 24 bit Mystery

I had the issue that the 24 bit output via A2DP was not working, but the corresponding 32 bit example was just working fine. So I decided to double check the I2S output with the help of a logical analyzer. Checking 16 bits First I was double checking how the working 16 bit is showing up. So I used the following Arduino Sketch which was just outputting some unique numbers per byte: #include “AudioTools.h” AudioInfo Read more…

Arduino AudioTools: Logging on Stereoids

The Readme from the AudioTools project describes how to use the logger: AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Debug); You can log to any object that is a subclass of Print and valid log level values are: Debug, Info, Warning, Error. But only few peaple realize the power behind this! So let me give you a couple of ideas: you can log to a file you can use any other standard Arduino class that inherits from Print like Wire, Ethernet, Read more…

Arduino Support for the Lyrat Mini Board

I had some open issue, that the LyraT Mini Audio Board was not working with my AudioTools and AudioDrivers library, so I was digging into this board a bit deeper. Here are the main two differences to the regular supported LyraT or AudioKit boards: It uses a ES8311 codec chip which supports only mono to manage the amplifer and aux output. My driver library was supporting this chip, so I had the audio output working Read more…

Testing My ESP32-S3 Camera Baord

In order to test the USB functionality of the ESP32-S3, I bought the following camera/microphone board: Before testing the USB I implemented and executed the following test cases for each hardware component: Testing the user button Testing the LED Testing the Color LED Testing the SD Testing the SDMMC Testing the PSRAM Testing the Camera Testing the Microphone Here is a summary of the limitations/issues that I have found: I could not make the 4 Read more…

Filtering Out Metadata Before Decoding MP3

MP3 files can contain metadata that stores information about the title, the author etc. If you send an MP3 stream with metadata to a decoder, the logic is usually resilient enough to skip this automatically. However there can be some cases where the codec can’t cope and is crashing. One way to deal with this, is to remove the metadata from the file. But a more flexible solution is to just filter out the metadata Read more…