Shop OBEX P1 Docs P2 Docs Learn Events
IR sensor going crazy! — Parallax Forums

IR sensor going crazy!

swrightswright Posts: 2
edited 2008-05-01 16:53 in BASIC Stamp
Can anyone give me troubleshooting advice on the IR sensors? My boebot is just spinning in circles. I have tried changing resistors and frequency. When I put my in front of the sensor, it seems to turn toward it?????

I have now posted my program!




Post Edited (swright) : 5/1/2008 4:55:29 PM GMT

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-05-01 16:46
    Please post your code. You can post it as a link, if you click on the little "pencil" icon at the top right of your posting.

    You do know, that the IR-Detector gives you a LOW when it SEES IR-Light, and a HIGH when it doesn't, right? Because it sounds like you're doing it backwards right now.
  • gncguygncguy Posts: 35
    edited 2008-05-01 16:53
    Unfortunately, I think the best way to handle it is start over.· the BoeBot book describes a process for building up to the IR roaming code.· First, write a simple program that simply sends the IR flag value out to the DEBUG window.· Then place your hand in front of each IR sensor and make sure the detect flag is being set.· IF it is then the physical layout is correct.· Then it must be a software problem.·So you need to check the logic as indicatd above.· If the logic seems ok then it could be another problem.· ·I had a problem like this when I let the BoeBot turn too much in response to obstacles.· When I reduced the amount of response it worked much better.
Sign In or Register to comment.