Shop OBEX P1 Docs P2 Docs Learn Events
Newbie Problem — Parallax Forums

Newbie Problem

Bill KennyBill Kenny Posts: 15
edited 2005-09-28 13:37 in Robotics
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

Comments

  • Tom WalkerTom Walker Posts: 509
    edited 2005-09-27 19:21
    I know the code works...so if you have copied the code correctly (I didi not check that), then I would look for a hardware problem...the first of which would be making sure that you have good batteries.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • Bill KennyBill Kenny Posts: 15
    edited 2005-09-27 19:32
    Hi Tom,
    ·
    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
  • Bill KennyBill Kenny Posts: 15
    edited 2005-09-27 22:19
    I added a couple of pictures so if anyone can see a hardware problem ,,, giva a ahout out!

    Thanks
    Bill·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Thanks

    Bill
    576 x 432 - 150K
    576 x 432 - 140K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-28 00:00
    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
  • Bill KennyBill Kenny Posts: 15
    edited 2005-09-28 00:26
    Chris,
    ·
    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


    640 x 480 - 53K
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-09-28 00:40
    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
  • kogeratkogerat Posts: 31
    edited 2005-09-28 01:49
    Hi Bill,

    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.
  • Tom WalkerTom Walker Posts: 509
    edited 2005-09-28 13:37
    You can find out if it is the detectors by covering their "tubes" with a piece of electrical tape. You should then not get any jiggle, but you also won't detect anything, so watch out for walls. If the 'bot runs fine at that point, remove the tape from one of the detectors and observe...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
Sign In or Register to comment.