controlling servos question

I have to control 18 servos and i have a few questions. What are all the different ways to move a servo? and can you use one of these codes to move two servos simultaneously? Thanks, (sorry if this posted twice).

I don’t know what you mean by “all the different ways to move a servo”. As for you using 1 control signal to make several servos do the same thing … that should work.

http://www.youtube.com/watch?v=xwZyfOnS8dk

what i mean is that there are different codes that can move the servo. one of them has to do with microseconds, another has to do with angles and for loops, and the third way i know is something like “servo.write (180)” and that moves it to 180 degrees. I wanted to know if there were any other ways. And more importantly, i have 18 servos connected to 18 different pins and i want to move 3 or so at the same time. Is that possible by doing…

servo1.write (180)
servo1.write (120)
servo3.write (45)

will this move the servos simultaneously? I would just try it but i dont have the arduino and servos with me at the moment.

If you stick w/the Arduino servo library functions there are 2 servo commands; servo.write(deg) and servo.writeMicroseconds(usecs). The latter being for those servos that use extended (shorter and longer) pulsewidths.

Your example code above will send all the commands out within a 8 usecs of each other. Is that close enough to simultaneous ? Given real-world servo response times it is (IMO).

Yes that’s what I needed to know. Thanks

If I remember right, another user had problems with twitching servos when trying to control a lot of servos. It was discussed on this forum in the last year or so. Found the thread: https://forum.sparkfun.com/viewtopic.ph … ng#p147029