Pulse Width Modulation RC Servomotor Library compatible with classic and extended models. Models limit are customizable
Dependents: FRC_2018 0hackton_08_06_18 0hackton_08_06_18_publish Kenya_2019 ... more
Diff: RC_Servo.h
- Revision:
- 1:8482eba4d652
- Parent:
- 0:b8dcca3dc509
- Child:
- 2:a762abad6301
--- a/RC_Servo.h Mon May 21 15:55:54 2018 +0000 +++ b/RC_Servo.h Mon May 21 16:07:20 2018 +0000 @@ -57,6 +57,15 @@ RC_Servo(PinName PWM, int _extended = 0); /** + * Set the min and max time associeted with both position + * + * @param Tmin pulsewidth (in us) associated with Min position (must be more than 400) + * @param Tmax pulsewidth (in us) associated with Max position (must be less than 2400) + * @return 0 if OK, any other value if FAIL + */ + int setLimits (int Tmin, int Tmax); + + /** * Set the position of the Servo * * @param position float number between 0 and 1 (0 = Min, 1 = Max)