MrDEB
Well-Known Member
using the post #177 found PINK NOISE on youtube, adjusted the gain I think to lowest level.
I recall seeing somewhere that using 3.3v instead of 5v would reduce noise level. Might try this?
[/CODE]
I recall seeing somewhere that using 3.3v instead of 5v would reduce noise level. Might try this?
Code:
[code]
const int SoundIn = A0;
//const int Level;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int ADCValue = (analogRead(SoundIn)) ; //this line reads the ADC input into the variable ADCValue
int dBValue = 20 * log10(ADCValue);
int Level = abs(ADCValue-512);
//this line calculates the dB level of ADCValue and puts it in the varialbe dBValue
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
Serial.print(Level);
Serial.println(" level = ");
//the beginning of the next line for the next measurement
delay(100); //this line delays for 0.1 second before the process repeats
}