Shop OBEX P1 Docs P2 Docs Learn Events
MSRS Test program TestSpeakerLedsServos.bs2 — Parallax Forums

MSRS Test program TestSpeakerLedsServos.bs2

MarcVWMarcVW Posts: 5
edited 2008-09-25 22:05 in Robotics
When I run this example program (TestSpeakerLedsServos.bs2 ) after the robot moves forward it resets back to the beep and just loops. I cant find a problem in the programming or in the circut it is meant to run with. Any help would be nice.
Thank you

' TestSpeakerLedsServos.bs2
' {$STAMP BS2}
' {$PBASIC 2.5}
counter VAR Word
DEBUG "Beep!!!...", CR
FREQOUT 4, 3000, 3500
DEBUG "Lights on...", CR
HIGH 15
HIGH 14
PAUSE 2000
DEBUG "Lights off...", CR
LOW 15
LOW 14
DEBUG "Forward...", CR
FOR counter = 1 TO 35
· PULSOUT 13, 850
· PULSOUT 12, 650
· PAUSE 20
NEXT
DEBUG "Rotate left...", CR
FOR counter = 1 TO 35
· PULSOUT 13, 650
· PULSOUT 12, 650
· PAUSE 20
NEXT
DEBUG "Rotate right...", CR
FOR counter = 1 TO 35
· PULSOUT 13, 850
· PULSOUT 12, 850
· PAUSE 20
NEXT
DEBUG "Backward...", CR
FOR counter = 1 TO 35
· PULSOUT 13, 650
· PULSOUT 12, 850
· PAUSE 20
NEXT
DEBUG "Done!", CR

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-09-25 16:11
    Sounds like low batteries. This would cause the BASIC Stamp to brownout and reset. Try replacing the batteries with fresh ones. Are you using rechargeable batteries or standard alkaline?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • MarcVWMarcVW Posts: 5
    edited 2008-09-25 22:05
    I'm using rechargable batteries. I did not think about that Im going to try some alkalines. Thanks
Sign In or Register to comment.