Files
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea3cny.brd
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea3cny.sch
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea3photo.brd
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea3photo.sch
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea5cny.brd
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea5cny.sch
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea5photo.brd
-
elettronica / rescue / IcaroRescue_TODO / rescue_linea5photo.sch
Last update 5 years 11 months
by
Emanuele Giacomini
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