Hello, I need your help
I have the loudness sensor v0.9b on my arduino. It seems it works however I don't understand what the results from the sensor mean.
How to know what the results mean in decibels ? Is it possible to convert directly in the program ?
And I would like to change the threshold in the program (I have found the program on the internet).
My threshold should be 45 decibels. How to convert it ? Currently it is 400 (it was like that when i had downloaded the program).
The program :
// Function: If the sound sensor senses a sound that is up to the threshold you set in the code, the
LED is on for 200ms.
// Hardware: Grove - Sound Sensor, Grove - LED
/macro definitions of the sound sensor and the LED/
#define SOUND_SENSOR A0
#define LED 3 // the number of the LED pin
#define THRESHOLD_VALUE 400//The threshold to turn the led on 400.00*5/1024 = 1.95v
int sensorValue = analogRead(SOUND_SENSOR);//use A0 to read the electrical signal
if(sensorValue > THRESHOLD_VALUE)
turnOnLED();//if the value read from A0 is larger than 400,then light the LED