Controlling servos with a pot
Gramps
Posts: 117
I’m working on “servo control with a pot” on page 158 WAM.
The demo moves the servo about 45 degrees when the pot is moved 90 degrees. How do you match them so they both move together from 0 to 90?
Post Edited By Moderator (Joshua Donelson (Parallax)) : 4/21/2010 12:20:05 AM GMT
The demo moves the servo about 45 degrees when the pot is moved 90 degrees. How do you match them so they both move together from 0 to 90?
Post Edited By Moderator (Joshua Donelson (Parallax)) : 4/21/2010 12:20:05 AM GMT
Comments
· You can include another servo by adding a PULSOUT command under the first command. You would have to provide another pin to pulse on, but the time that is used in the first PULSOUT could be used in the second PULSOUT for the same motion.
:: Code Snippet ::
· PULSOUT ServoPin, time
· PUSLOUT ServoPin2, time
Be sure to declare the new ServoPin2 at the top of the program, otherwise you will get a syntax error.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Respectfully,
Joshua Donelson
www.parallax.com
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·"If you build it, they will come."
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·