5.a.3. Move a Servo

In the script below, Ctrl+Alt+C sets the servo’s target to near the end of its range. Ctrl+Alt+B sets the servo’s target to near the other end of its range.

^!c::Run usccmd --servo 0`,7500,,Hide
^!b:: Run usccmd --servo 0`,4500,,Hide

In the script below, Ctrl+Alt+C will set the speed and acceleration of the servo on channel 0, then set its target to near the end of its range. Ctrl+Alt+B will remove the speed and acceleration limits, then set the servo’s target to near the other end of its range.

^!c::
RunWait usccmd --accel 0`,12,,Hide
RunWait usccmd --speed 0`,12,,Hide
Run usccmd --servo 0`,7500,,Hide
return

^!b::
RunWait usccmd --accel 0`,0,,Hide
RunWait usccmd --speed 0`,0,,Hide
Run usccmd --servo 0`,4500,,Hide
return

Related Products

Pololu Jrk 21v3 USB Motor Controller with Feedback
Pololu Jrk 12v12 USB Motor Controller with Feedback
Mini Maestro 12-Channel USB Servo Controller (Assembled)
Micro Maestro 6-Channel USB Servo Controller (Assembled)
Pololu Simple High-Power Motor Controller 18v15 (Fully Assembled)
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors