taiyou komazawa
/
Nucleo_fliping_arm
2018 HongoMechaTech A
lib/StraightMD.cpp
- Committer:
- Komazawa_sun
- Date:
- 2018-09-18
- Revision:
- 0:e83b840a5f86
File content as of revision 0:e83b840a5f86:
#include"mbed.h" #include"StraightMD.h" StraightMD::StraightMD(PinName pwm,PinName dere):Pwm(pwm),Dere(dere) { Pwm.period(0.0001); } void StraightMD::drive(double duty) { if(duty > 0) { Dere = 0; Pwm = abs(duty); } else { Dere = 1; Pwm = abs(duty); } } void StraightMD::brake(double duty){ } void StraightMD::free() { }