Pololu Robotics & Electronics
My account Comments or questions? About Pololu Contact Ordering information Distributors

Hi, New and wanting help starting to learn to write a script to control a few servos


Hi, I have a Meastro Micro and wish to us eit to control a few servos. As a learning project Im going to build a simple robot arm with 3 servos, one for base rotation, one for base joint and the third servo for an elbow. I haven’t programmed anything since using BASIC in the early eighties on Sinclair ZX81 so im struggling. Im looking through the script language basics but its looking like greek to me. Are there any simple examples of a script i can look at that just make a few servos do a few simple moves?




If the example scripts are confusing, there are a couple things you can do to make learning the Maestro scripting language easier. First, it is based on the FORTH programming language, so you might try searching the Internet for basic FORTH programming guides. Another thing you can do is use the “Step Script” button to examine the operation of the example scripts. This button causes the script to execute a single instruction, then stop and wait for another command. Also, if you have trouble writing your script, you can post what you have tried, how the system is behaving, what behavior you expect, and I would be happy to see if I can help.