Advertisement
britneybeatey

Dice Prototype LED testing

Jun 9th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. /*
  2. * Britney Beatey
  3. * Version 1
  4. * Dice Prototype
  5. */
  6. const int pinLed1 = 7;
  7. const int pinLed2 = 5;
  8. const int pinLed3 = 3;
  9. const int pinButt = 10;
  10.  
  11. void setup() {
  12. // put your setup code here, to run once:
  13. pinMode (pinLed1, OUTPUT);
  14. pinMode (pinLed2, OUTPUT);
  15. pinMode (pinLed3, OUTPUT);
  16. pinMode (pinButt, INPUT);
  17.  
  18. Serial.begin (9600);
  19.  
  20. digitalWrite (pinLed1, HIGH);
  21. digitalWrite (pinLed2, HIGH);
  22. digitalWrite (pinLed3, HIGH);
  23. delay (500);
  24. digitalWrite (pinLed1, LOW);
  25. digitalWrite (pinLed2, LOW);
  26. digitalWrite (pinLed3, LOW);
  27. }
  28.  
  29. void loop() {
  30. // put your main code here, to run repeatedly:
  31. Serial.print (digitalRead(pinButt));
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement