Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- // put your setup code here, to run once:
- pinMode(5, INPUT);
- pinMode(13, OUTPUT); //will use the built in led to show the result
- }
- void loop() {
- // put your main code here, to run repeatedly:
- power = digitalRead(5);
- if (power) {
- digitalWrite(13, HIGH);
- // do other things if you want
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement