Control multiple servo motors with multiple potentiometers

Hi,
i’m still newbie with pololu maestro.
i’ve baught Mini Maestro 12 servo contrller with 6 servos and 6 potentiometers. therefore, i would like to control each servos with each potentiometers. can anyone help me?:slight_smile:
i tried to adjust this script to make it control multiple servos, but it didnt work…

begin
1 get_position # get the value of the pot, 0-1023
4 times 4000 plus # scale it to 4000-8092, approximately 1-2 ms
2 servo # set servo 2 based to the value
repeat

many thanks
mansc :slight_smile:

Hello, mansc.

You’re going to need to understand the purpose of each of the 3 lines inside the begin/repeat loop, and then make 6 copies of those lines, and change them so that they each use a different potentiometer channel and a different servo channel.

In the Channel Settings tab you will need to configure every channel connected to a potentiometer as an input.

I recommend that you try adapting that script to work just two servos as a first step. If you can’t figure out how to do that, post your Mastro Settings file (which includes your script) here. If you can figure out how to do that, then you should be able to figure out how to do 6 servos.

If you have trouble understanding what the code is doing, you can read the “The Maestro Scripting Language” section of the Maestro User’s Guide.

–David

thanks david. :slight_smile: