.TouchCalibrate()

back to FEHServo

Description

Each servo has slightly different physical properties. In order to compensate for this, each servo must be calibrated. If the calibration is not done, then at the edges of the servo range (at ~0º and/or ~180°), the servo might push against its own end stops. When this happens, the servo will make a slight whine and will subtly rumble. This is not good for the servo and will result in increased degradation, which could lead to your servo breaking. When you call this function, follow the instructions that will appear on screen. Note that this function requires the use of the touch screen. After successful completion, the function will print the required values to be used in the .SetMin() and .SetMax() functions.

Parameters

None.

Returns

None.**

Examples

#include <FEHServo.h>

int main(void)
{
    //declares a servo on servo port 3
    FEHServo arm_servo(FEHServo::Servo3); 

    //calibrate the servo
    arm_servo.TouchCalibrate();
}

 

**While the calibrate function does not return any values, the minimum and maximum values will be printed to your screen.