Created
December 8, 2015 18:31
-
-
Save michaelsarduino/a175b24b8c09fb0fba79 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
void setup () | |
{ | |
pinMode (13, OUTPUT) ; | |
pinMode (3, INPUT) ; | |
} | |
int val; | |
void loop () | |
{ | |
val = digitalRead (3) ; | |
if(val == HIGH) //Bei Beruehrung | |
{ | |
digitalWrite (13, HIGH); //LED AN | |
} | |
else | |
{ | |
digitalWrite (13, LOW); //LED AUS | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment