Guest User

Untitled

a guest
Jun 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. /*************************************************
  2. * Push_Button | HyperDuino example Code
  3. *
  4. * To demonstrate use of the HyperDuino with the
  5. * 37 Sensors kit by Elegoo.
  6. *
  7. * Target: Arduino IDE and compatible editors
  8. *
  9. * by David Sparks June 21, 2018
  10. **************************************************/
  11.  
  12. // Declarations
  13. int buttonState = LOW;
  14.  
  15. void setup() {
  16. // put your setup code here, to run once:
  17. pinMode(8, INPUT);
  18. pinMode(13, OUTPUT);
  19. }
  20.  
  21. void loop() {
  22. // put your main code here, to run repeatedly:
  23. buttonState = digitalRead(8);
  24. if (buttonState == HIGH) {
  25. digitalWrite(13, LOW);
  26. } else {
  27. digitalWrite(13, HIGH);
  28. }
  29. }
Add Comment
Please, Sign In to add comment