Hi! I wanted to do a project where I take input from a Bluetooth source, do FFT and have the microcontroller control some LEDs accordingly, then output the audio signal to speakers. It seems like a Teensy 4.0 is the right microcontroller for the job. I bought RN-52 breakouts from you all a while ago and would like to use those because they are what I have but am open to suggestions.
So, is a Teensy 4.0 and RN-52 enough to do the job? It looks like I need to do I2S from RN-52 to Teensy and I2S out to a converter and then on to a speaker? Or is there another kind of output that could go directly to the speaker/amplifier?
Thank you in advance for your advice!
Yep, although like you mentioned the Teensy outputs are digital so you’ll need either the Audio expansion board for Teensy or an external I2S DAC that would then go to a speaker 
Thanks so much for your reply! I ordered the parts but started to think about future development. I see that the RN-52 breakout has been discontinued but can’t see a clear replacement. Does one of the boards you offer do Bluetooth audio like for a speaker?
This board SparkFun Thing Plus - ESP32 WROOM (USB-C) - SparkFun Electronics has BLE and I2S 
You can test it with the BT audio examples for the esp32
I see! It looks like this is powerful enough to do FFT, so is there any reason to go the Bluetooth + Teensy route that you can think of if I’m just doing basic FFT analysis? I am just used to thinking purely in terms of Arduinos with everything else being done through breakout boards so this is a bit of a new paradigm for me. There are so many great options out there that it’s hard to pick one direction to go in!
Either is fine
The Teensy can be overkill for a basic FFT; it’s really useful for high MHz situations…use it if the esp32 proves too slow (teensy is really useful here if you need complex FFT or a bunch of 'em)
I really appreciate your quick and kind responses! I’m sorry to keep bothering you, but I’m figuring this out as I go along.
One of the advantages of Teensy seems to be the audio design tool that allows quick and easy access and manipulation of the audio streams. So, I was looking for an ESP32 library to pop in that could perform FFT on received Bluetooth audio. It seems like some have done it, but it’s a little convoluted (e,g, this example). I admit that I have been spoiled by working in the Arduino ecosystem where everything is de-boned and soft for easy consumption! Do you offhand know of a similarly easy library or method to the Teensy one to work with for the ESP32?
It’s a bit of a longer story there, see ESP32 audio FFT library - Kimi
Thank you very much for this and all of your guidance!
1 Like