Library for driving a motor with a DRV8833 motor driver or similar.
Motor.h
- Committer:
- pclary
- Date:
- 2014-10-19
- Revision:
- 0:0d650a332dcc
File content as of revision 0:0d650a332dcc:
#ifndef MOTOR_H #define MOTOR_H #include "mbed.h" class Motor { public: Motor(PinName pin1, PinName pin2); void speed(float value); Motor& operator=(float value); void brake(); private: PwmOut pwm1; PwmOut pwm2; }; #endif // MOTOR_H