Total newbie here, just started with Arduino this week. I've got an Arduino MKR1000 WiFi board and am trying to use this sound sensor to detect noise. From the sensor to the board I connect wires as follows:
VCC -> VCC
GND -> GND
OUT -> D7
My sketch is as follows:
const int PIN_NOISE = 7;
void setup() {
Serial.begin(9600);
while (!Serial) {
;
}
pinMode(PIN_NOISE, INPUT);
}
void loop() {
Serial.print(digitalRead(PIN_NOISE));
delay(1000);
}
The sensor has an LED that lights up when noise is detected so I should be able to tell when it is detecting noise. However, in the serial monitor I only see a long string of 1s (HIGH) no matter if the LED is on. Either I am missing something quite obvious or this sensor is not compatible with this board. Any help would be much appreciated.