Intro to Servos with Fusion

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


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?