Arduino sound sensor does not give accurate values
I've tried reading pin from D0
as well as reading from analog on A0
. Pin constantly gives me 1
and A0
gives me almost exclusively the value 26 and can go up to 29 if I blow on the sensor really hard.
void setup() {
pinMode(A0, INPUT); // changes nothing
}
void loop() {
int soundVal;
soundVal = analogRead(A0);
Serial.print("Sound = ");
Serial.println(soundVal, DEC);
delay(500);
}
I expect to get a value between 0 and 1024 or something like that but I only get values between 25 and 29, making it extremely difficult reading if a sound is high or low as well as if a sound was detected
Edit: I've connected GRD on the sound sensor to GRD on my Arduino, A0
from the sound sensor to A0
on Arduino, the + pin on the sound sensor to 5V and left the D0
pin on the sound sensor untouched since I don't really need it I guess.