I have a quick question and I hope it’s simple enough for anyone to quickly help me. I am trying to program the micro maestro 6. I have the sample code from the manual for analog control of one servo.
# Sets servo 0 to a position based on an analog input.
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
0 servo # set servo 0 based to the value
Repeat
I want to do this 3 times but can’t figure out this simple script. I’m not a programmer.
This script reads channel 1 (my pot) and operate the servo on channel 0. At the same time I need to read channels 1,3 and 5 (all pots) and operate servos on channel 0,2 and 4.
Can anyone please show me how to do this quickly and easily? I want to keep this very simple as this is all this unit will do for me.
Thanks Paul, it is working just fine. Will the maestro work on both analog and digital servos? I’d rather have the newer digital ones if possible. From what I can tell power consumption is the only drawback. I’m plugged into the wall on this project so I’m not using any batteries at all.
Is it possible to have one channel on the maestro as an input and when it goes high it will tell the servo to reverse it’s direction? Right now I have a 5K slide pot controlling one servo. Push the slide pot right, the servo moves right, push it to the left, the servo moves left. I want to flip a switch that will cause the servo to move left when I slide the pot to the right. And vice versa. Is this simple code to do?
If you know how to program, it is probably going to be simple. If you do not, you will need to learn! You could make a attempt and post your code here when you get stuck.