Zumo32U4 library
Zumo32U4Motors.h
Go to the documentation of this file.
1// Copyright Pololu Corporation. For more information, see http://www.pololu.com/
2
5#pragma once
6
7#include <stdint.h>
8
14{
15 public:
16
27 static void flipLeftMotor(bool flip);
28
38 static void flipRightMotor(bool flip);
39
45 static void setLeftSpeed(int16_t speed);
46
52 static void setRightSpeed(int16_t speed);
53
62 static void setSpeeds(int16_t leftSpeed, int16_t rightSpeed);
63
64 private:
65
66 static inline void init()
67 {
68 static bool initialized = false;
69
70 if (!initialized)
71 {
72 initialized = true;
73 init2();
74 }
75 }
76
77 static void init2();
78};
Controls motor speed and direction on the Zumo 32U4.
static void flipLeftMotor(bool flip)
Flips the direction of the left motor.
static void setRightSpeed(int16_t speed)
Sets the speed for the right motor.
static void flipRightMotor(bool flip)
Flips the direction of the right motor.
static void setLeftSpeed(int16_t speed)
Sets the speed for the left motor.
static void setSpeeds(int16_t leftSpeed, int16_t rightSpeed)
Sets the speeds for both motors.