Created
December 12, 2016 20:55
-
-
Save JarekParal/78771d54fda04183ff28de10896c2f20 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
int tlac = 8; | |
int led = 9; | |
int stav = 0; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(led, OUTPUT); | |
pinMode(tlac, INPUT_PULLUP); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
stav = digitalRead(tlac); | |
if (stav == HIGH) | |
{ | |
digitalWrite(led, HIGH); | |
} | |
else | |
{ | |
digitalWrite(led, LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment