/* Sound Sensor Playing Reads the analog output of Sound Sensor through A0, prints the result to the serial monitor Read the digital output of Sound Sensor throug A1, prints the result to the serial monitor Connect the pins in the following way: GND----GND VCC----5V A------A0 D------A1 */ void setup() { Serial.begin(9600); } void loop() { int sensorValue = analogRead(A0); //Read the analog value of the sound sensor int digitalValue = digitalRead(A1);//Read the digital value of the sound sensor Serial.print("Analog Value="); Serial.println(sensorValue);//Print the analog value to serial monitor if(digitalValue){ Serial.println("D is HIGH now"); delay(5000); // wait for a second } }