Intro to Servos with Fusion

Servos are motors that have internal electronics to allow them to be easily set to a specific position. The above servo is a hobby sized servo perfect for learning about robotics!
Be sure to plug the servo in with the black wire matching the black paint on the right side of the port.

Servo Sweep Program:

With the servo plugged in to port S0 and nothing attached to it, run the following example program. Your servo should sweep back and forth.

import Fusion
import time
f = Fusion.driver()
usb = Fusion.usbGamepad()
f.servoEnable(f.S0, 1)
servoPos = 0

while True:
    #toggle back and forth between 50 and 200
    f.servoTarget(f.S0, 200)
    f.delay(.5)
    f.servoTarget(f.S0, 50)
    f.delay(.5)

Try changing the 50 and 200 values to anything between 0 and 255 to experiment with different positions!

Adding a Mechanism to your Servo

You can add all sorts of attachments to servos to control your mechanism!
You can mount our servo to your robot with any of the brackets above!

Using the Diagnostic Tool to Set the Limits of your Servo:

1) Click the bars on the top left of the screen.

2) Choose Diagnostic Tool

3) You can change the position of your servo by checking the box to enable your servo and then changing the number to whatever you want. Be sure to write down the position of your servo that you want for your soccer arm.

Last updated

Was this helpful?