Newbie Problem
Bill Kenny
Posts: 15
Hello All,
·
I am just starting at this so please Excuse my ignorance. I just bought the full Boe-Bot kit and I am still doing the projects in the text book. I am having some troubles with Activity #5: High Performance IR Navigation on p. 525 in the Robotics with the Boe-Bot book. When I run the program, Boe-Bot FREEKS out and just shake's like a paint shaker. I have copied the code exactly as written but it still does it. If anyone can see what the problem is Please let me know
·
Thanks
Bill
·
·Here is the code.
·
' Robotics with the Boe-Bot - FastIrRoaming.bs2
' Higher performance IR object detectionassisted navigation
' {$STAMP BS2}······················ ' Stamp directive.
' {$PBASIC 2.5}·······················' PBASIC directive.
DEBUG "Program Running!"
· irDetectLeft······ VAR· Bit········· ' Variable Declarations
· irDetectRight····· VAR· Bit
· pulseLeft········· VAR· Word
· pulseRight········ VAR· Word
FREQOUT 4, 2000, 3000·············' Signal program start/reset
DO········································ ' Main Routine
· FREQOUT 8, 1, 38500··············' Check IR detectors
· irDetectLeft = IN9
· FREQOUT 2, 1, 38500
· irDetectRight = IN0
············································ ' Decide how to navigate.
· IF (irDetectLeft =0) AND (irDetectRight = 0) THEN
··· pulseLeft =650
··· pulseRight = 850
· ELSEIF (irDetectLeft = 0) THEN
··· pulseLeft = 850
··· pulseRight = 850
· ELSEIF (irDetectRight = 0) THEN
··· pulseLeft = 650
··· pulseRight = 650
· ELSE
··· pulseLeft = 850
··· pulseRight = 650
· ENDIF
· PULSOUT 13,pulseLeft··············' Apply the pulse.
· PULSOUT 12,pulseRight
· PAUSE 15
············································ ·' Repeat main routine
LOOP
·
I am just starting at this so please Excuse my ignorance. I just bought the full Boe-Bot kit and I am still doing the projects in the text book. I am having some troubles with Activity #5: High Performance IR Navigation on p. 525 in the Robotics with the Boe-Bot book. When I run the program, Boe-Bot FREEKS out and just shake's like a paint shaker. I have copied the code exactly as written but it still does it. If anyone can see what the problem is Please let me know
·
Thanks
Bill
·
·Here is the code.
·
' Robotics with the Boe-Bot - FastIrRoaming.bs2
' Higher performance IR object detectionassisted navigation
' {$STAMP BS2}······················ ' Stamp directive.
' {$PBASIC 2.5}·······················' PBASIC directive.
DEBUG "Program Running!"
· irDetectLeft······ VAR· Bit········· ' Variable Declarations
· irDetectRight····· VAR· Bit
· pulseLeft········· VAR· Word
· pulseRight········ VAR· Word
FREQOUT 4, 2000, 3000·············' Signal program start/reset
DO········································ ' Main Routine
· FREQOUT 8, 1, 38500··············' Check IR detectors
· irDetectLeft = IN9
· FREQOUT 2, 1, 38500
· irDetectRight = IN0
············································ ' Decide how to navigate.
· IF (irDetectLeft =0) AND (irDetectRight = 0) THEN
··· pulseLeft =650
··· pulseRight = 850
· ELSEIF (irDetectLeft = 0) THEN
··· pulseLeft = 850
··· pulseRight = 850
· ELSEIF (irDetectRight = 0) THEN
··· pulseLeft = 650
··· pulseRight = 650
· ELSE
··· pulseLeft = 850
··· pulseRight = 650
· ENDIF
· PULSOUT 13,pulseLeft··············' Apply the pulse.
· PULSOUT 12,pulseRight
· PAUSE 15
············································ ·' Repeat main routine
LOOP
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...
·
Yup, the batteries are freshly charged Energizer rechargeable 2500 mAh and the hardware works ok. If I change the program back to the RoamingWithIr.bs2 on p. 250-253 it all works just fine. The code is also letter per letter.
Thanks·
Bill
Thanks
Bill·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Thanks
Bill
··· Just a note...Rechargeable batteries run at lower voltage, so it's possible the BOE-Bot is still browning out.· Can you try fresh standard batteries to see if that helps?·
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
·
Thanks for your response, I will try that but I don’t think it’s the problem. Like I stated previously, it will run·another program I have given it·but that program. I can put resistance on the wheels and bog it down with any other program and it just chugs along. I guess I could go out and buy some new batteries, or maybe use some 2 cell LiPo's or hook it up to my home made charging station/power supply and dial in 5 solid volts.
Thanks Guys
Bill
·· I apparently missed that part.· Can't hurt to try though.· Otherwise I would take the previous suggestion of looking for a hardware issue.· Sometimes it's best to "start over" in which case you would remove all the components from the top and start over, one component at a time.· Sometimes that's the only way to spot a hardware/wiring error.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
My Boe-Bot did a simular jig with the fast roaming program. I readjusted the IR LEDs to point more to the sides and down a little. Seems that when they were pointing foward like yours I was getting IR bouncing off of every thing giving me false detctions. If you connect the piezo to pin 4, it will let you know if you are getting a brownout reset. Sounds like you have IR emitter/dector poroblem somewhere. If re-aimming the IR LEDs doesen't work, put the the snipet of code in that's on page 244 that allows you to monitor the IR detectors output with the red LEDs to make sure they are behaveing properly. hope this helps.
Jim K.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Truly Understand the Fundamentals and the Path will be so much easier...