Advertisement
madmax9900

Untitled

Oct 21st, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement