Hello,
I am new to this forum and I hope that I am posting this in the right spot :).
I am currently working on a VU-Meter using the Esp32 Dev Kit V4 from Az-Delivery. Power supply, LEDs etc are all working well, but I ran into trouble with my microphone.
If I understand correctly, I can not send hyperlinks as a new user and I am very limited with pictures, so I will just say that I bought the "5 Pack High Sensitivity Microphone Sensor Detection Module" (what a name) from Youmile from Amazon.
I hooked up the sensor this way: ESP 32 5V -> Sensor VCC; ESP32 GND -> Sensor GND; Sensor Out -> ESP32 GPIO 33. The ESP32 is powered via the USB-Port. This is just for testing without the LEDs.
My Code is basically just the following:
#define micPin 33
void setup ()
{
Serial.begin(9600);
}
void loop()
{
Serial.println(analogRead(micPin));
}
Depending on how I set the potentiometer on the sound module I get a reading of around 320 or 4095. Talking makes it jump to the other extreme.
I am completely new to these sound sensors, so I am a bit confused. I tried some Code to get Amplitudes from digital signals, but the sensor from that example spat out 1s and 0s with the code I posted.
My plan is/was to calculate the number of pixels which light up from the analogread value, but that obviously does not work.
Can you guys help me out here? It would be greatly appreciated.
Nils
PS: I am sure that this is not the best way to post Code and I apologize upfront. I am sure you can give me some hints to do it correctly.
Also: I kinda thought that I logged into a German forum, but I am writing this in English since the entire page is English too. Should you guys be German I apologize dearly for the inconveniance. If you are not I apologize dearly for my bad English :).
