Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <Wire.h>
  2. #include <Zumo32U4.h>
  3.  
  4. Zumo32U4ButtonA buttonA;
  5. Zumo32U4ButtonB buttonB;
  6. Zumo32U4ButtonC buttonC;
  7. Zumo32U4Motors motors;
  8.  
  9.  
  10. void setup() {
  11. // put your setup code here, to run once:
  12. buttonA.waitForButton ();
  13. }
  14.  
  15. void loop() {
  16. // put your main code here, to run repeatedly:
  17. if (buttonB.getSingleDebouncedPress ()) {
  18.  
  19. delay(500);
  20.  
  21. motors.setSpeeds(100, 100);
  22.  
  23.  
  24. }
  25. if (buttonC.getSingleDebouncedPress()) {
  26.  
  27. motors.setSpeeds(0, 0);
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement