function to read ADC should be changed to analogReadMilliVolts()
correct function for sensor reading:
int getSoundValue(int sensorPin) {
float v = analogReadMilliVolts(sensorPin) / 1000.0;
float decibel;
if (v <= 0.6) decibel = 0.0;
if (v >= 2.6) decibel = 130.0;
else decibel = v * 50.0;
return int(decibel);
}
when selecting IO port, wrong pin number is applied
select IO2-3 results in pin number 1 instead of 3. same for IO4-5 and IO6-7
following problems with this block:
analogReadMilliVolts()
correct function for sensor reading:IO2-3
results in pin number1
instead of3
. same forIO4-5
andIO6-7