Go to Post The most amazing and inspiring character I've met in FIRST, Wayne [Cokeley] has definately shown me the character of a true leader. - Bharat Nain [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 23-03-2004, 02:01
PBoss PBoss is offline
Registered User
#1212
 
Join Date: Jan 2003
Location: Nowhere
Posts: 9
PBoss is an unknown quantity at this point
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
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 15:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi