Problem with Servo control or Servo32v3
GeorgeCollins
Posts: 132
I am using the Prop Object Servo32v3 to control servos. I using a spin studio board connected to a CrustCrawler Quadruped, which has 8 hobby servos.
If I do the following code:
Servo 0 sets but Servo 2 doesn't
If I reverse the order
Servo 2 sets but not servo 1. Both servos obviously work and are connected. Why does it matter what order I set the servos in? How do I set multiple servos at the same time?
The prop and servos have different power supplies, and I do not think current drain is the issue.
Thank you for your help.
George Collins
If I do the following code:
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 'Note Clock Speed for your setup!! OBJ Servo : "Servo32v3" PUB Main Servo.start Servo.Set(0,1000) Servo.Set(2,1000)
Servo 0 sets but Servo 2 doesn't
If I reverse the order
CON _clkmode = xtal1 + pll16x _xinfreq = 5_000_000 'Note Clock Speed for your setup!! OBJ Servo : "Servo32v3" PUB Main Servo.start Servo.Set(2,1000) Servo.Set(0,1000)
Servo 2 sets but not servo 1. Both servos obviously work and are connected. Why does it matter what order I set the servos in? How do I set multiple servos at the same time?
The prop and servos have different power supplies, and I do not think current drain is the issue.
Thank you for your help.
George Collins
Comments
Read the comments in the source code for the included demo program.
Mike is correct, The Servo's must be preset to a known position before you start the servo routine. Doing this also provides information as to what pins you will be using for servo's creating a mask so that the other pins will be ignored from within the servo routine.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.