SHARE
TWEET

Untitled

madmax9900 Oct 21st, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int Button = 0;
  2.  
  3. void setup()
  4. {
  5.   pinMode(1, OUTPUT);
  6.   pinMode(6, INPUT);
  7.   pinMode(2, OUTPUT);
  8.   pinMode(3, OUTPUT);
  9.   pinMode(4, OUTPUT);
  10.   pinMode(5, OUTPUT);
  11. }
  12.  
  13. void loop()
  14. {
  15.   digitalWrite(1, HIGH);
  16.   Button = digitalRead(6);
  17.   if (Button == HIGH) {
  18.     digitalWrite(2, HIGH);
  19.   }
  20.   Button = digitalRead(6);
  21.   if (Button == HIGH) {
  22.     digitalWrite(3, HIGH);
  23.   }
  24.   Button = digitalRead(6);
  25.   if (Button == HIGH) {
  26.     digitalWrite(4, HIGH);
  27.   }
  28.   Button = digitalRead(6);
  29.   if (Button == HIGH) {
  30.     digitalWrite(5, HIGH);
  31.   }
  32.   delay(10); // Delay a little bit to improve simulation performance
  33. }
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