Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <Zumo32U4.h>
- Zumo32U4ButtonA buttonA;
- Zumo32U4ButtonB buttonB;
- Zumo32U4ButtonC buttonC;
- Zumo32U4Motors motors;
- void setup() {
- // put your setup code here, to run once:
- buttonA.waitForButton ();
- }
- void loop() {
- // put your main code here, to run repeatedly:
- if (buttonB.getSingleDebouncedPress ()) {
- delay(500);
- motors.setSpeeds(100, 100);
- }
- if (buttonC.getSingleDebouncedPress()) {
- motors.setSpeeds(0, 0);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement