Created
August 22, 2018 02:21
-
-
Save gallirohik/c5c7c82ada7208c461f5ca16682bbda1 to your computer and use it in GitHub Desktop.
IOT project (Smart Door)
This file contains hidden or 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() { | |
| // put your setup code here, to run once: | |
| pinMode(4,INPUT); | |
| pinMode(13,OUTPUT); | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: | |
| Serial.begin(115200); | |
| if(digitalRead(4)) | |
| { | |
| digitalWrite(13,LOW); | |
| Serial.println("DOOR is Closed...!"); | |
| } | |
| else | |
| { | |
| digitalWrite(13,HIGH); | |
| Serial.println("DOOR is Opened...!"); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment