Skip to content

Instantly share code, notes, and snippets.

@li2hub
Last active Oct 16, 2018
Embed
What would you like to do?
void setup(){
pinMode(2,INPUT);
Serial.begin(9600);
}
void loop(){
if (digitalRead(2)==HIGH)
{
Serial.println("Sound Detected!");
}
else
{
Serial.println("No Sound");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment