Created
November 20, 2020 15:23
-
-
Save Servuc/d1078368f5abf1c151c087b778dfbdaf 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
#define PIN_INT 2 | |
#define PIN_LED 13 | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode( PIN_LED, OUTPUT ); | |
pinMode( PIN_INT, INPUT ); | |
digitalWrite( PIN_LED, LOW ); | |
} | |
void loop() { | |
delay(100); | |
digitalWrite( PIN_LED, digitalRead( PIN_INT ) ? HIGH : LOW ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment