The hackster.io Sony Spresense contest was intriguing for the audio subsystem capable of up to 192K stereo samples per second and I saw a chance to revisit an older project that worked with music and a strip of NeoPixel LEDs for visualization.
I was not able to easily get the WS2812 NeoPixels working with the board SPI using a timing method - it worked but has some spurious flashes and noise, an issue with timing. However, the newer clocked DotStar led strips work perfectly, so moving on to a mashup of those and one of the Sony demo Arduino apps that captures audio PCM and presents it for signal processing. A simple app just finds the max audio level in a work unit - it is a supply of audio in a buffer of 512 bytes - which is 256 16bit signed samples, which at a slow but sufficient 16K sample rate yields a frame rate of 16 milliseconds, or 62.5 frames per second, which is fast enough to be appealing as shown in this video:
The Spresense is super responsive - clapping gets an immediate flash with no noticeable delay.
This project is not for the contest, and demonstrates some capabilities of the hardware, a milestone on the way worthy of its own page.
For the electret mic - it can be seen that a bias resistor need not be SMD soldered onto the board - a 2K resistor can be wired externally from the bias supply pin to the mic.
The DotStar strip is easily wired to the hardware SPI pins D11 for data and D13 for the clock, and a ground.
Comments