Shop OBEX P1 Docs P2 Docs Learn Events
BOE problems — Parallax Forums

BOE problems

chsomchsom Posts: 2
edited 2008-04-15 04:41 in BASIC Stamp
I am using a BOE trying·to make a monster with a tongue that goes out, picks up an item and comes back.·I am·using the following coding. The problem is that it goes out just fine. Coming back the servos that are sliding the tongue back start jumping rather than coming back smoothly. Thus the back motion takes a long period of time.

Can anyone look at the coding and tell me if there is a mistake in it?

Thanks
DFly

' {$STAMP BS2}
' {$PBASIC 2.5}

counter VAR Byte
BACKCOUNTER VAR Byte
TOP CON 650
BOTTOM CON 850
DO
DEBUG ? IN3
IF IN3 = 1 THEN
FOR counter = 1 TO 255
· PULSOUT 12,850
· PULSOUT 13,650
· PULSOUT 14,725
· DEBUG ? counter
· PAUSE 15
NEXT
FOR counter = 255 TO 1
· PULSOUT 12,850
· PULSOUT 13,650
· PULSOUT 14,725
· DEBUG ? counter
· PAUSE 20
NEXT
FOR counter = 1 TO 112
· PULSOUT 12,850
· PULSOUT 13,650
· PULSOUT 14,725
· DEBUG ? counter
· PAUSE 20
NEXT
FOR BACKCOUNTER = 1 TO 255
· PULSOUT 12,TOP
· PULSOUT 13,BOTTOM
· PULSOUT 14,850
· DEBUG ? BACKCOUNTER
· PAUSE 20
NEXT
FOR BACKCOUNTER = 255 TO 1
· PULSOUT 12,TOP
· PULSOUT 13,BOTTOM
· PULSOUT 14,850
· DEBUG ? BACKCOUNTER
· PAUSE 20
NEXT
FOR BACKCOUNTER = 1 TO 255
· PULSOUT 12,TOP
· PULSOUT 13,BOTTOM
· PULSOUT 14,850
· DEBUG ? BACKCOUNTER
· PAUSE 20
NEXT
FOR BACKCOUNTER = 255 TO 1
· PULSOUT 12,TOP
· PULSOUT 13,BOTTOM
· PULSOUT 14,850
· DEBUG ? BACKCOUNTER
· PAUSE 20
NEXT
FOR BACKCOUNTER = 1 TO 200
· PULSOUT 12,TOP
· PULSOUT 13,BOTTOM
· PULSOUT 14,850
· DEBUG ? BACKCOUNTER
· PAUSE 20
NEXT
END
ELSEIF· IN3 = 0 THEN
· PULSOUT 12,750
· PULSOUT 13,750
· PULSOUT 14,750
· PAUSE 20
ENDIF
LOOP

Post Edited (chsom) : 4/15/2008 2:20:58 AM GMT

Comments

  • FranklinFranklin Posts: 4,747
    edited 2008-04-15 03:15
    If your debug statements run smoothly then I would say your problem is mechanical. Too heavy a load maybe?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • chsomchsom Posts: 2
    edited 2008-04-15 04:41
    Okay, so I tried using three other servos that are not connected to anything, thus they have no load and they still do the same thing coming back.

    Thanks...
Sign In or Register to comment.