If anyone has an ESP32 and an MSGEQ7 would they mind testing this out?

If anyone has an ESP32 and an MSGEQ7 would they mind testing this out? It uses android but can also be controlled through any BLE Serial Terminal App.

If you have an ESP32 and an MSGEQ7

LED PIN DATA_PIN 33

MSGEQ7_STROBE_PIN 26
MSGEQ7_RESET_PIN 25
//MSGEQ7 AUDIO PIN IS PIN 27
adc2_config_channel_atten( ADC2_CHANNEL_7, ADC_ATTEN_0db );

esp_err_t r = adc2_get_raw( ADC2_CHANNEL_7, ADC_WIDTH_12Bit, &read_raw);//AUDIO PIN IS PIN 27

If you type into a BLE terminal or with the app, it should send those values.

if (rxValue.find(“printaudio”) != -1) {
Serial.println(“Turning ON!”);
pat = “printaudio”;
setPattern(pat);

}

and in the loop,

I want to see what other values people are getting on their MSGEQ7 with ESP32’s adcs.

Also this is a working BLE Android ESP32 Bundle. Includes Arduino and Android app.

Have fun!

Hi

Thanks for sharing your code, I’ve not tried BLE on the ESP32 yet, but will soon.

I have played with the ESP32 ADC, and apologise if you know the stuff below already.

The ADC still has this bug

If you’ve got noise problems, see this
http://esp-idf.readthedocs.io/en/latest/api-reference/peripherals/adc.html#adc-api-adc-calibration

I tried using the ADC with FFT, but the results were way off, it was taking too long, I’ve gone back to analogRead.

Lastly, the ADC takes a number of samples (the default is 8 samples) and averages them, I’m not sure that this will work with the MSGEQ7.

This is the best ADC description I’ve found.

Also just remembered that I had to add a 0.10µF Capacitor in the data line when I used an MSGEQ7 with the ESP32.

As I said above, I’m using FFT now, and the audio data is working really well. I’m just working on the audio patterns now.

I also needed the same capacitor in the data line when using a microphone with FFT.

I’m in the middle of so many projects at the moment, that I won’t be able to try your code for a while. Sorry