Driver for two motors library
Driver.h
- Committer:
- cristian_junca
- Date:
- 2020-07-29
- Revision:
- 1:e417951c16d7
- Parent:
- 0:eafb70ae80f7
File content as of revision 1:e417951c16d7:
#include "mbed.h" class Driver{ public: Driver(PinName M1A, PinName M1B, PinName M2A, PinName M2B); void setPeriod_ms(int32_t); void forward(float, float); void backward(float, float); void right(float, float); void left(float, float); void neutral(); protected: PwmOut M1A; PwmOut M1B; PwmOut M2A; PwmOut M2B; float _dutyCycle1; float _dutyCycle2; int32_t _period; };