SHARE
TWEET

Untitled

a guest Jun 25th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2.   // put your setup code here, to run once:
  3.   pinMode(5, INPUT);
  4.   pinMode(13, OUTPUT); //will use the built in led to show the result
  5.  
  6. }
  7.  
  8. void loop() {
  9.   // put your main code here, to run repeatedly:
  10.   power = digitalRead(5);
  11.   if (power) {
  12.     digitalWrite(13, HIGH);
  13.     // do other things if you want
  14.   }
  15.  
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top