Files

ZumoMotors.h
#ifndef ZumoMotors_h #define ZumoMotors_h #include <Arduino.h> class ZumoMotors { public: // constructor (doesn't do anything) ZumoMotors(); // enable/disable flipping of motors static void flipLeftMotor(boolean flip); static void flipRightMotor(boolean flip); // set speed for left, right, or both motors static void setLeftSpeed(int speed); static void setRightSpeed(int speed); static void setSpeeds(int leftSpeed, int rightSpeed); private: static inline void init() { static boolean initialized = false; if (!initialized) { initialized = true; init2(); } } // initializes timer1 for proper PWM generation static void init2(); }; #endif
Report a bug