GAMMA_A
Dependencies: DataPool MD_PID mbed
2017_3_b/MD/MD.cpp
- Committer:
- hirotayamato
- Date:
- 2017-08-25
- Revision:
- 2:158fea945e51
- Parent:
- 0:6ed41770a6b7
File content as of revision 2:158fea945e51:
#include"mbed.h" #include"MD.h" MD::MD(PinName pwm,PinName dere):Pwm(pwm),Dere(dere) { Pwm.period(0.0001); } void MD::rotate(double duty) { if(duty > 0) { Dere = 0; Pwm = duty; } else { Dere = 1; Pwm = -duty; } }