Shop OBEX P1 Docs P2 Docs Learn Events
HexCrawler Code — Parallax Forums

HexCrawler Code

hlwhlw Posts: 7
edited 2006-06-09 13:20 in Robotics
confused.gif·The Code in file HexCrawler_Home.BS2, Place HexCrawler legs centered and down. Well this code does not do this.
all the legs on the right side are up and the legs on the left are down. and I thought that HorzCenter con 750 would put the
legs in the center position, But it dosen't the right is all the way clockwise and the left is counterclockwise??

The part of code ( Place legs in center down position )
·Can someone explain to me what controls the position of the servos in this code?
Thanks for anny help

'Place legs in center down position
Home_Legs:
FOR servoAddr = 1 TO 5 STEP 2
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr, LiftRamp, $2C, $01, CR]
· PAUSE 500
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr-1,LiftRamp,horzPos0.LOWBYTE,horzPos0.HIGHBYTE, CR]
· PAUSE 500
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr, LiftRamp, $B0, $04, CR]
NEXT
FOR servoAddr = 7 TO 11 STEP 2
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr, LiftRamp, $B0, $04, CR]
· PAUSE 500
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr-1,LiftRamp,horzPos1.LOWBYTE,horzPos1.HIGHBYTE, CR]
· PAUSE 500
· SEROUT PSC, Baud+$8000,[noparse][[/noparse]"!SC", servoAddr,LiftRamp, $2C, $01, CR]
NEXT
DEBUG CR, CR, "Ready to Adjust Legs"
END

What I need is only 45 to 90 deg. of movement not 180 deg. on movement

Thanks

Post Edited (hlw) : 6/7/2006 9:09:01 PM GMT

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-06-07 22:16
    Hello,

    ·· Did you mechanically center the servos?· Also are you sure that the servos are plugged into the right sections of the PSC?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • hlwhlw Posts: 7
    edited 2006-06-07 23:52
    Hello,
    Yes severl times, the servos are not in the center position as 750 is suposed to mean. That is for my horizontal positions the vertcal just travle's to far.
    The code is suposed to put the legs in the center down position but for some reasion it dosent.
    Yes the servos are pluged in according to the HexCrawler Kit manuel, I've checked it several times and will ck it again.
    Thanks
    harold
  • hlwhlw Posts: 7
    edited 2006-06-08 23:05
    Well operator head space did it again.
    I readdjusted all the servos, I had to make new servo arms to get the right through from servo to legs.
    and now it is trying to act like a bug should act.

    I wouls like to know how that code works. I've been trying to figure it out myself bun no luck yet.
    Thanks again
    harold
  • Mike GMike G Posts: 2,702
    edited 2006-06-09 13:20
    We have lots of code for the HexCrawler at crustcrawler.com if you’re interested.

    Mike Gebhard
Sign In or Register to comment.