a dc_motor drive lib use two PWM IO to drive the dc_motor
Dependents: Nucleo_F411RE_OS_Robot_Tank
motodriver.h
- Committer:
- adaphoto
- Date:
- 2018-06-19
- Revision:
- 0:cd71771d494f
- Child:
- 1:d31307e787fd
File content as of revision 0:cd71771d494f:
#ifndef MOTORDRIVER_H_ADA #define MOTORDRIVER_H_ADA class Motor { public: Motor(PinName pwm1pin, PinName pwm2pin); float Speed(float speed); void Stop(); private: PwmOut _pwm1; PwmOut _pwm2; /** Initialization. */ void init(); }; #endif