Three infrareds on Boe Bot for maze. Need help with my code.
acossey
Posts: 3
in BASIC Stamp
So I'm teaching robotics to 7th and 8th graders. I didn't know a thing about programing or robotics a month ago. We are using the Boe bot and our school has been invited to compete with other Jr Highs in a small competition in April. One of the three events is the walled maze. The kids have been programming and practicing with modified fast roam and a modified artificial intelligence programs and have had good success. I'm looking to teach them how to fine tune the bot with one more IR set. I'm hoping to find a way to run the bot along the right wall until it sees something in front. then it should turn left and pick up the right wall again. I have attached my butchered code that i attempted to make today. It started out as a line following program. I have tested all the IR LEDs and receivers and all are working fine. Please help me and let me know if I'm on the right track or do I need another approach. Please forgive my poor coding skills since this is still very new to me. I'm only able to add this on IR set to the bot because the rules state that no more than $5 can be spent on the bot to prepare for this competition.
By the way the kids are having a great time learning and are excited to come into class. I have a 4 hour saturday class and they get there 40 min early and won't go home. It is very rewarding to see them so interested.
Rich
By the way the kids are having a great time learning and are excited to come into class. I have a 4 hour saturday class and they get there 40 min early and won't go home. It is very rewarding to see them so interested.
Rich
Comments
Here's another suggestion which could simplify our code, if you have time to order parts from Ebay China. I like these sensor modules: http://www.ebay.com/itm/121670026689 At $1.59, you could get three for less than $5: front, left, & right.
Caution, these are 4-pin modules, vastly superior to the cheaper 3-pin modules (do NOT get these): http://www.ebay.com/itm/391086506274
These are adjustable sensitivity, digital high/low modules which generate their own IR signal, they just go high or low if something (like a wall!) is sensed. High= nothing sensed, low=something sensed. Very easy to install & program, letting you focus on navigation. Here are a few videos I made about this 4-pin sensor: