Need Boe-Bot help: Right servo twitching..
Hello Everyone,
I'm pretty much a beginner in robotics so right now I'm just going through the whole Boe-Bot book to learn.
I just assembled my Boe-Bot and got to chapter 4 where you actually make it move and after my first program, I noticed my right servo was twitching as if it was being sent a short pulse about every second, but only after it completed the program. So it went forward for three seconds, seemed to stop,·then the right servo pulsed, just a bit, every second afterward. And here's that program:
·· ' Robotics with the Boe-Bot - BoeBotForwardThreeSeconds.bs2
·· ' Make the Boe-Bot roll forward for three seconds.
·· ' {$STAMP BS2}
·· ' {$PBASIC 2.5}
·· DEBUG "Program Running!"
·· counter······· VAR··· Word
·· FREQOUT 4, 2000, 3000··············' Signal program start/reset
·· FOR counter = 1 TO 122············· ' Run servos for 3 seconds
···· PULSOUT 13, 850
···· PULSOUT 12, 650
···· PAUSE 20
·· NEXT
·· END
I tested·my Boe-Bot·and it can perform any program (including·the·ones from chapter 3 that are used to test the servos)·with the servos working fine, but once it finishes, my right servo twitches continually until I disconnect power.·I changed the batteries and that did not make a difference.
Anyone have any ideas to help me?
I'm pretty much a beginner in robotics so right now I'm just going through the whole Boe-Bot book to learn.
I just assembled my Boe-Bot and got to chapter 4 where you actually make it move and after my first program, I noticed my right servo was twitching as if it was being sent a short pulse about every second, but only after it completed the program. So it went forward for three seconds, seemed to stop,·then the right servo pulsed, just a bit, every second afterward. And here's that program:
·· ' Robotics with the Boe-Bot - BoeBotForwardThreeSeconds.bs2
·· ' Make the Boe-Bot roll forward for three seconds.
·· ' {$STAMP BS2}
·· ' {$PBASIC 2.5}
·· DEBUG "Program Running!"
·· counter······· VAR··· Word
·· FREQOUT 4, 2000, 3000··············' Signal program start/reset
·· FOR counter = 1 TO 122············· ' Run servos for 3 seconds
···· PULSOUT 13, 850
···· PULSOUT 12, 650
···· PAUSE 20
·· NEXT
·· END
I tested·my Boe-Bot·and it can perform any program (including·the·ones from chapter 3 that are used to test the servos)·with the servos working fine, but once it finishes, my right servo twitches continually until I disconnect power.·I changed the batteries and that did not make a difference.
Anyone have any ideas to help me?
Comments
Basically, the END statement puts the Stamp into a low power mode where it goes to sleep for short periods of time to save power. When this happens, the I/O pins will float and this back and forth between floating and their previous state may make the servos twitch. See the chapter on the STOP and END statements in the Basic Stamp Syntax and Reference Manual.