ir problem
Greg62
Posts: 1
in BASIC Stamp
I am volunteering teaching a summer science robotics class and I have a girl that will be a high school senior this fall and is interested in being an engineer. We are using the Boe-Bot Basic Stamp BS2 and we are having trouble with the programing. She wants to rotate a servo to a given point about a 360 degree axis using IR sensors. She has currently wired six IR circuits (as shown in the Robotics text that Andy wrote) that are 60 degrees apart. Attached is her program which will increment the servo from whatever current position it is at. However, she wants to be able to wave her hand in front of any one of the six IR sensors and have the servo rotate directly to that position. We were thinking that a Look Up command might work but got confused and are not sure if that would be the correct approach. We started to put the Look Up command at the top of the attached program but went no further. We are using a continuous servo. Not sure if that will work and how we would index it to a given start/reference point. We would appreciate any help.
bs2
1K
Comments
Not elegant, but it works. I saw that somewhere, just can't recall where.