Created
March 28, 2020 20:18
-
-
Save komponenrobot/df5ac68f53f355916f215911c15a1718 to your computer and use it in GitHub Desktop.
led_prot
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(12, OUTPUT); | |
pinMode(11, OUTPUT); | |
pinMode(2, INPUT_PULLUP); | |
} | |
void loop() { | |
if(digitalRead(2) == LOW){ | |
digitalWrite(12, HIGH); | |
digitalWrite(11, HIGH); | |
} | |
else { | |
digitalWrite(12, LOW); | |
digitalWrite(11, LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment