MrDEB,
Here's what I suggest you do now.
From my code in #168, temporally comment out the three Serial.print lines shown below. The only thing you want to print is the ADCValue, the second print line. Also comment out any delay statements. You want to take readings as fast as possible.
Code:
//Serial.print("ADC count: "); //this line, with the "print" command prints the label "ADC count: " and leaves the cursor at the end of the line
Serial.print(ADCValue); //this line prints the value of ADCValue where the last line left off and leaves the cursor at the end of the line
// Serial.print(" dB level: "); //this line prints the label " dB level: " and leaves the cursor at the end of the line
// Serial.println(dBValue); //this line, withe the "println" command prints the value of dBValue at the end of the line, and moves the cursor to
//the beginning of the next line for the next measurement
With a quiet room, start the
serial plotter from the Arduino menu where you start the serial monitor.
Let this run until the plot is full and screen capture it. It will look sort of like this:
Look at the highest and lowest peaks and write down the numbers, In the case above, the highest peaks are around 1000, the lowest close to zero. In a quiet room, they should be close to 512.
Next, put a constant noise source near the microphone. Blender, vacuum cleaner. Something loud and constant. Rotate the pot all the way in one direction and make another graph. Write down the largest and smallest peaks again. The numbers should be greater than what you got when it was quiet.
Rotate the pot all the way the other direction and do it again. The numbers will be bigger if the pot is set for maximum gain; if they are smaller, the pot is set for minimum gain.
With the noise source going, the desirable outcome is a graph sort of like the above. Some peaks should reach 1023, some should reach zero. Just some though. If the many of the peaks reach 1023 and zero, turn the gain pot to reduce sensitivity.
Let us know the results.