Myke Predko is a VERY affable guy, and I'm sure he'd be happy to address that Futaba issue for you. He can be contacted at the email address which follows below. Replace the word "at" with the at sign (@), compress out the spaces, and please use the following in the Subject line: "Myke Question" so it will be filtered properly, away from the junk mail.
····· myke at myke.com
He also maintains a web site at myke.com and mentions on the lead page of that web site the book you mentioned above.
D Faust said...
I think that the servo for my ping (parallax servo) travels the 180 deg with a 1048 pulse and 452 (on a BS2). Center still seemed to be reached. As for what LILDI said, I thought servos do slow down when getting closer to their final position. That is what gives you speed control with a CR one. My guess for why the overshoot occurs is because the servo only notices that it reached its desire point when it went to far. I am not sure, just guessing.
But it only overshoots in one direction.· And if you watch PhiPi's video, you will see his does the same thing.
A very, very small pause can make all the difference. Remeber the graph I posted a while back with the massive shift in measurements depending on the direction? Well, I shifted some lines around, added a tiny bit of an extra wait between the last pulse to the servo and the PING))) pulse and the shift has totally disappeared. I am sure the same applies to your code. Add a little pause between the servo getting pulse train for one particular position and the next. Try 50ms, it's almost nothing [noparse]:)[/noparse]
' {$STAMP BS2}
' {$PBASIC 2.5}
servo PIN 8
DO
FOR B0 = 1 TO 50
PULSOUT servo, 1000
PAUSE 20
NEXT
PAUSE 30 ' with the pause 20 above, this will amount to 50
FOR B0 = 1 TO 100
PULSOUT servo, 750
PAUSE 20
NEXT
PAUSE 30
FOR B0 = 1 TO 50
PULSOUT servo, 500
PAUSE 20
NEXT
PAUSE 30
FOR B0 = 1 TO 100
PULSOUT servo, 750
PAUSE 20
NEXT
PAUSE 30
LOOP
Try this, see what it does for you. Increase it from 30 to 50 if necessary.
Before and After adding the 50ms pause in my own code.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
Comments
Myke Predko is a VERY affable guy, and I'm sure he'd be happy to address that Futaba issue for you. He can be contacted at the email address which follows below. Replace the word "at" with the at sign (@), compress out the spaces, and please use the following in the Subject line: "Myke Question" so it will be filtered properly, away from the junk mail.
····· myke at myke.com
He also maintains a web site at myke.com and mentions on the lead page of that web site the book you mentioned above.
Regards,
Bruce Bates
Try this, see what it does for you. Increase it from 30 to 50 if necessary.
Before and After adding the 50ms pause in my own code.
Gr,
Mightor
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
| To know recursion, you must first know recursion.
Post Edited (Mightor) : 8/25/2007 12:24:24 PM GMT