Shop OBEX P1 Docs P2 Docs Learn Events
Bad Servos?? — Parallax Forums

Bad Servos??

Half-LucasHalf-Lucas Posts: 13
edited 2006-02-24 23:12 in Robotics
I was coding a simple program, which makes the servos start, run for 3 seconds, then stop.
However, the servos didn't stop. Apparently the program is looping itself forever...

This is the program:

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

DEBUG "program running"

counter VAR Word

FREQOUT 4, 20, 3000
FOR counter = 1 TO 122

PULSOUT 12, 850
PULSOUT 13, 650
PAUSE 20
NEXT

PAUSE 2000

END


why does the program loop itself, if there is an END and if the Loop is restricted??? mad.gif

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2006-02-24 22:56
    Do you get the 'program running' message multiple times? If so, this is a very common occurence when you 'brown-out' the BS2's power by putting too great a load on the Vdd line with something like a servo.

    So I'd look at the batteries you're using.
  • Half-LucasHalf-Lucas Posts: 13
    edited 2006-02-24 23:06
    Hmmm... good thought, but all I'm using except for the servos is the piezospeaker. I don't know how I can "Brown out " the chip like that...
  • Half-LucasHalf-Lucas Posts: 13
    edited 2006-02-24 23:12
    YES that was the problem! I replaced the battery! Thank you for your help
Sign In or Register to comment.