|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
A quick IR sensor question
Hi everyone,
I just have one quick question. We do our autonomous by dead reckoning, but have put one IR sensor on the robot (at the right height for the beacon, without a servo). All we want to be able to do at the end of our dead reckoning code, is to find a beacon (any one of the two) and go to it.I attached the sensor to digital input one, and here is what my code reads: .... if(dig_in_01==0) { //drive left and right (to find the beacon) } else { //drive forward for 5 secs.(when find the beacon) } Will this code work. Also, will the digital input become 1 is it sees any of the two beacons, or I have to specify which beacon I want it to look for. If I have to specify the frequency or whatever, how do I do that. I don't want to mess with all the complicated IR code out there to measure distance or anything. I just want to know when my sensor sees the beacon, thats it. We have a regional coming up, so any help would be appreciated. Thanks, |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Q&A Discuss: Quick C Programming Q | CD47-Bot | Extra Discussion | 6 | 16-11-2003 11:16 |
| A quick and entertaining lesson | Veselin Kolev | Chit-Chat | 12 | 19-08-2003 12:28 |
| Image Discuss: If done. Quick Fix is here | CD47-Bot | Robot Showcase | 2 | 04-03-2003 20:07 |
| Image Discuss: Team 1089 Team Mercury's robot Quick Silver | CD47-Bot | Robot Showcase | 8 | 25-02-2003 10:33 |
| Need some quick help, ASME scholarship! | Hymnson | General Forum | 2 | 25-02-2002 16:07 |