View Single Post
  #9   Spotlight this post!  
Unread 15-07-2005, 19:48
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,363
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Servo command confusion?!?!?!?!

Ok, your not using a separate servo board. Then the servo command is generating software PWM signals. Think of the servo command as a little function that turns the pin on and off according to the parameters that you give it. It generates the PWM signal for a certain period of time. Then it stops and returns to the next line of code. The atom servo command has a parameter that tells the command to repeat it's self up to 30 times. You only want 1 period so it should be 1. The behavior your getting is exactly as expected. A work around to give the appearance of simultaneous control would be to put the servo commands in a loop and make small incremental changes. Something like the following.

Dim I
for I = -1200 to 1200 step 100
servo 1,I,1
servo 2,I,1
servo 3,I,1
next

The range and step can be changed to suit your needs. Depending on the speed of the processor and interpreter this should give the appearance of the servos moving together. If it's not fast enough or it's jerky then you may have to use a servo board. Look at the SSC-32 servo board from the site you referenced