7.4 Servo Motor Control

Controlling a servo motor usually means setting the desired motor position. The command to perform this action in Logo is “seth” which stands for “set heading”. In Tinker, use the block “Set servo heading”. Consider the following example:

to servo_control
    a, seth 10
    wait 10
    seth 40
end

The above example will turn a servo motor connected to servo port A to the heading position “10”, wait for 1 second and then turn the servo to the heading position “40”.

Position 10 Position 40

Servo Motor Heading Position

The heading positions “10” or “40” in the example does not correspond to a standard angle or unit. It is a GoGo Board internal position number. Therefore, you need to determine what number to use so that the motor points to the desired direction. This is easily done using the GoGo Widget’s manual servo controls as described earlier.

Caution - Do not use a heading position that exceeds the bounds of the servo. Since servos do not rotate a full circle, exceeding the heading bounds could break the internal gearings of the servo. Although different servo models and brands have slight variations but, typically, the heading value should stay between 10 - 40.

results matching ""

    No results matching ""