ESP32 Spectrum Analyzer Taps Into Both Cores

We probably don’t need to tell the average Hackaday reader that the ESP32 is a powerful and extremely flexible microcontroller. We’ve seen some incredible projects using this affordable chip over the last few years, and by the looks of it, the best is yet to come. That’s because it always takes some time before the community can really figure out how to get the most out of a piece of hardware.

Take for example the Bluetooth audio player that [squix] was recently working on. Getting the music going was no problem with the esp32-a2dp library, but when he wanted to add some visualizations the audio quality took a serious hit. Realizing that his Fast Fourier transform (FFT) code was eating up too much processor power, it seemed like a great time for him to explore using the ESP32’s second core.

[squix] had avoided poking around with the dual-core nature of the ESP32 in the past, believing that the second core was busy handling the WiFi communication. But by using the FreeRTOS queue system, he wrote some code that collects audio data with one core and runs the actual FFT magic on the other. By balancing the workload like this, he’s able to drive the array of 64 WS2812B LEDs on the front of the Icon64 seen in the video after the break.

Even if you’re not terribly interested in running your own microcontroller disco, this project may be just the example you’ve been waiting for to help get your mind wrapped around multitasking on the ESP32. If you want to master a device with this many tricks up its sleeve, you’ll need all the help you can get.

Continue reading “ESP32 Spectrum Analyzer Taps Into Both Cores”

Turn Your Old Bluetooth Headphones Into A DIY Car Audio Receiver

wireless-car-audio

[Tim] drives a 1995 Mitsubishi TS Magna, which is equipped with a less than stellar accessory package he lovingly calls a “poverty pack”. He outfitted his ride with an aftermarket head unit that can support the Bluetooth A2DP profile, provided he buys the ridiculously overpriced kit sold by Pioneer. Reluctant to shell out more money on an audio kit than his car is worth, he whipped up his own Bluetooth kit for far less than Pioneer’s asking price.

He had a set of Nokia Bluetooth headphones that he was willing to part with, so he disassembled them to see how he might interface with his car stereo. Connecting the headset to his head unit was a relatively easy task, but he had to work a bit harder to get his Bluetooth receiver powered properly.

After both undervolting and then nearly cooking his wireless audio rig, [Tim] managed to get things operating to his liking. He says that the audio is a touch quieter than he would like at the moment, so he will likely be revising his design in the near future. For now however, he can stream tunes from his phone while he cruises around town.