4 servo demo, what am I doing wrong.
Dgswaner
Posts: 795
Proto board. onboard power. it's connected correctly I can get it to move.
I had this code working on my DEMO board, but now I can't seem to get it working. it will only move to the angle specified in servo.start anything I do to the repeat loop doesn't effect it at all. I haven't modified the servo4 object at all. I've got to be missing something simple but I can't figure it out. any help would be appreciated. the servo stays on holding the start position.
thanks,
dg
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
I had this code working on my DEMO board, but now I can't seem to get it working. it will only move to the angle specified in servo.start anything I do to the repeat loop doesn't effect it at all. I haven't modified the servo4 object at all. I've got to be missing something simple but I can't figure it out. any help would be appreciated. the servo stays on holding the start position.
thanks,
dg
{{ Demonstration of the use of the servo4 object 08/29/2006 - Bob Belleville first version from scratch }} CON _CLKMODE = XTAL1 + PLL16X _XINFREQ = 5_000_000 OBJ SERVO : "Servo4" PUB go | unit0 servo.start(500,11,0,12,0,13,0,14) unit0 := 1 repeat servo.move_to(11,500,200) servo.wait(11) servo.move_to(11,1000,200) servo.wait(11) servo.move_to(11,2200,200) servo.wait(11) 'move one at a time if unit0 'cycle unit 0 on and off servo.move_to(0,0,0) 'unit 0 no signal unit0~ else servo.move_to(0,1000,0) unit0~~
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Comments
Thanks
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Well, the truth is, I am trailing you significantly in the curve, but I just now had it working with an HB-25 connected to a DC gear reduction motor. Worked out of the box! I think you will like it!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Thanks guys
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
Post Edited (Dgswaner) : 11/15/2007 7:18:31 PM GMT
You and Dg are welcome.
Glad I could help!
I am also looking to control 4 servos and I started with the Servo4 object then moved up to the Servo32. I have now moved back to the Servo4 object because it seems to be easier to use and I can turn off the servos by setting the angle to 0 (major power savings).
I just haven't figured out how to turn a servo back on after setting the servo angle to 0 (off)
Just remember that using servo signals outside the 1-2ms range for 180 degree movement, are "out of spec". So the limit values for one servo may not work with another. You will also most likely have to calculate a new center timing, after you have found the limits.