Shop OBEX P1 Docs P2 Docs Learn Events
Chapter 4: Boe-Bot Navigation — Parallax Forums

Chapter 4: Boe-Bot Navigation

MichelBMichelB Posts: 154
edited 2009-05-14 10:05 in Robotics
I've done activities 1 to 3 successfully but I noticed that at the end of each program even after centering (750) both servos, the right wheel go backward by fits and starts about 30° about each second. What's happened? Thank you for help, I hope that's not serious.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-05-13 13:52
    Put a STOP statement at the end of your program.

    If you use an END statement at the end of your program or just let it "go off the end", the Stamp goes into a low power mode that briefly causes all the I/O pins to become inputs about once a second. That's what's causing the twitch. You could also connect a "pull-down" resistor from the servo control I/O pins to ground. Anything from about 4.7K to 10K will work fine. This forces the servo control signal to stay off when the I/O pins become inputs.

    Read the chapter in the PBasic Manual on the STOP and END statements.
  • MichelBMichelB Posts: 154
    edited 2009-05-14 10:05
    Yes Mike, with a STOP instead of END it works, but why this problem occurs only for one servo (P12)? According to the help of BASIC Stamp, "STOP does not put the BASIC Stamp into low-power mode.", must I use END after STOP? Thank you for your help.
Sign In or Register to comment.