Skip to content

Instantly share code, notes, and snippets.

@JarekParal
Created December 12, 2016 20:55
Show Gist options
  • Save JarekParal/78771d54fda04183ff28de10896c2f20 to your computer and use it in GitHub Desktop.
Save JarekParal/78771d54fda04183ff28de10896c2f20 to your computer and use it in GitHub Desktop.
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