Guest User

Untitled

a guest
Sep 16th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.26 KB | None | 0 0
  1. int buttonPush = 12;
  2.  
  3. void setup() {
  4.   pinMode(LED_BUILTIN, OUTPUT);
  5.   pinMode(buttonPush, INPUT_PULLUP);
  6.   digitalWrite(LED_BUILTIN, LOW);
  7. }
  8.  
  9. void loop() {
  10.   int x = digitalRead(buttonPush);
  11.  
  12.   if (x == LOW) {
  13.     digitalWrite(LED_BUILTIN, HIGH);
  14.   }
  15. }
Add Comment
Please, Sign In to add comment