This blog continues the topic Low Latency Streaming of Audio Data and we have a closer look at ESP-NOW. This is a protocol developed by Espressif, which enables multiple devices to communicate with one another without using Wi-Fi.

I was missing a proper implementation that is based on Arduino Streams, so I have added one to my Arduino Audio Tools Library.

Here are the related example Arduino sketches:

When I was doing my tests, I first noticed that some audio data gets lost on the receiving side and it took quite some time until I figured out that I need to a blocking write to the buffer (and wait until enough memory is available again). The stream read is nice to have so that we have a consistent interface, but in real life it is much more efficient to provide a callback in the config where we e.g. just do a blocking write to i2s.

I was measuring 33000 to 37000 bytes per second which gives 16500 samples/second in mono and 8250 samples per second in stereo. This is good enough for some basic audio but insufficient for HIFI music.

So the conclusion here is as well, that we should use a low latency codec which is compressing audio. So in my next blog we start to have a look at potential codecs.


Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *