PDA

View Full Version : IR Detecting to execute alterate movements



Tim U
10-28-2009, 07:17 PM
I am using a BS2 with a single IR Detector in a boe-bot.

What I am trying to do is to make the Boe-Bot execute movements (right turn & Left Turn)·when the IR Detector sees a signal from a hand held remote control.
I want to alternate the movements, however I don't know how to write the PBasic code to tell the difference between the first button press and the second button press and·how can I tell the stamp the 3rd button press·should act like the first.

Any ideas???· I think is a matter ov naming a variable and incrementing it when the button is pressed.

Thanks
Tim

dandreae
10-28-2009, 10:00 PM
Yes, there is a book that you can download called "IR Remote for the Boe-Bot" that goes over this particular topic.· Here is a link for the download:·

http://www.parallax.com/Store/Books/EducationalTexts/tabid/181/CategoryID/66/List/0/Level/a/ProductID/149/Default.aspx?SortField=ProductName%2cProductName



Dave

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Dave Andreae

Parallax Tech Support·