Created
June 15, 2019 17:53
-
-
Save maxmacstn/b1bddff8352799b027fc6e5d0f7b769a to your computer and use it in GitHub Desktop.
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
/* | |
* doorBell_test.ino | |
* Copyright (c) 2019 Sitinut Waisara | |
* magiapp.me | github.com/maxmacstn | |
*/ | |
int signalPin = D1; | |
void setup() { | |
Serial.begin(115200); | |
pinMode(signalPin,INPUT); | |
} | |
void loop() { | |
if(digitalRead(signalPin) == HIGH){ | |
Serial.println("Doorbell Pressed"); | |
delay(2000); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment