Hello Everybody,
I’m using a Sound Sensor based on the LM393 amplifier and CZN-15E with Arduino Uno. I compiled the code and I got always values from 59 to 61.
If anyone can help, I want to know please if this value is decibel? If not, how can I get the decibel value?
Thank you in advance for your support.
const int analogInPin = A0;
int sensorValue = 0;
void setup() {
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(analogInPin);
Serial.print("sensor = " );
Serial.println(sensorValue);
// double db = (20. * log(10)) * (sensorValue / 5.);
Serial.print("db = ");
Serial.println(db);
delay(3000);
}
Best regards,