Results meaning from loundness sensor V0.9b

Hello, I need your help :slight_smile:
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
void setup()
{
Serial.begin(9600);
pins_init();
}
void loop()
{
int sensorValue = analogRead(SOUND_SENSOR);//use A0 to read the electrical signal
Serial.print("sensorValue ");
Serial.println(sensorValue);
if(sensorValue > THRESHOLD_VALUE)
{
turnOnLED();//if the value read from A0 is larger than 400,then light the LED
delay(200);
}
turnOffLED();
}
void pins_init()
{
pinMode(LED, OUTPUT);

I don't know "the loudness sensor v0.9b". But if you want the threshold to be in decibels you will need to calibrate it, i.e. to see what it actually reads for a range of dB levels.

To do that you will need a decibel meter and a sound source. If the level of accuracy is not too important then a free dB meter app for a smartphone may be sufficient.

Steve