My program seems to "glitch" then runs in a loop
smith772
Posts: 3
Hi, I am working on a project and I am getting some inconsistent behavior from my boe bot. Sometimes when I run a program, it runs just fine, other times, when running the same program, it "glitches" which means it jerks and doesn't complete the movement, then starts running in a loop, when there is no loop. I have tried many things, like disconnecting the battery for a time, reloading the program, re-writing the program, and sometime it helps, works for a few times, then starts acting up again.
Here is an example. It starts to run, goes in a circle, then makes a jerky move and starts running in a loop, when there is no loop
Please help!
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
FOR counter = 1 TO 35
PULSOUT 13, 850
PULSOUT 12, 750
PAUSE 20
NEXT
FOR counter = 1 TO 60
PULSOUT 13, 800
PULSOUT 12, 750
PAUSE 20
NEXT
FOR counter = 1 TO 28
PULSOUT 13, 830
PULSOUT 12, 700
PAUSE 20
NEXT
FOR counter = 1 TO 28
PULSOUT 13, 700
PULSOUT 12, 830
PAUSE 20
NEXT
END
Here is an example. It starts to run, goes in a circle, then makes a jerky move and starts running in a loop, when there is no loop
Please help!
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
FOR counter = 1 TO 35
PULSOUT 13, 850
PULSOUT 12, 750
PAUSE 20
NEXT
FOR counter = 1 TO 60
PULSOUT 13, 800
PULSOUT 12, 750
PAUSE 20
NEXT
FOR counter = 1 TO 28
PULSOUT 13, 830
PULSOUT 12, 700
PAUSE 20
NEXT
FOR counter = 1 TO 28
PULSOUT 13, 700
PULSOUT 12, 830
PAUSE 20
NEXT
END
Comments