Controls a 12V linear actuator up and down as used in the https://os.mbed.com/users/cnckiwi31/code/heros_leg_readout_torque_addition/ test rig
Dependents: heros_leg_readout_torque_addition_V3 DROPSAWTestRigCode_V4
Diff: LinearActuator.h
- Revision:
- 1:35bf896ac56e
- Parent:
- 0:5cc1284be040
- Child:
- 2:5d6b80aeb455
--- a/LinearActuator.h Fri Aug 07 09:09:42 2020 +0000 +++ b/LinearActuator.h Wed Aug 12 10:02:19 2020 +0000 @@ -17,7 +17,7 @@ LinearActuator (PinName dir_pin, PinName pwm_pin) : DirPin(dir_pin),PwmPin(pwm_pin) { - PwmPin.period(1/timing::PWMHertz); // 10kHz PWM + PwmPin.period(1/(double)timing::PWMHertz); // 10kHz PWM //default to off setDirection(false);