Last active
October 16, 2018 12:44
-
-
Save li2hub/f00994c27b30d3516093a9965eed6ec0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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