Thread: IR Seeker help?
View Single Post
  #6   Spotlight this post!  
Unread 24-09-2011, 02:25
biojae's Avatar
biojae biojae is offline
Likes Omni drives :)
AKA: Justin Stocking
FTC #5011 (BOT SQUAD) && FTC#72(Garage bots)&& FRC#0399 (Eagle Robotics)
Team Role: College Student
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Lancaster
Posts: 276
biojae is a jewel in the roughbiojae is a jewel in the roughbiojae is a jewel in the rough
Re: IR Seeker help?

Quote:
Originally Posted by EricH View Post
Do you have any access at all to an oscilloscope?

If you do, you should be able to use that. If not, it may be worthwhile to get access to one--it's a handy little device when it comes to measuring sensor and circuit output, even handier than a multimeter for some circuits.
The HiTechnic IRSeeker is an I2C sensor.
In this case, a logic analyzer would be a better tool.

Quote:
Originally Posted by Jared341 View Post
And the RobotC function calls are here...
http://bricxcc.sourceforge.net/nbc/n...nic_a_p_i.html
Those are the NXC (Not eXactly C) documents.

http://botbench.com/blog/2011/09/10/...er-suite-v2-1/
These are the RobotC sensor drivers by Xander Soldaat.
The first directory has examples on how to read the sensors.

Here is a snippet from HTIRS2-test1.c that shows how to read the direction, and the strength:
Code:
// read the current modulated signal direction
_dirAC = HTIRS2readACDir(HTIRS2);
// read the AC sensor strengths, where acS1 - acS5 are the 5 internal IR sensors
if (!HTIRS2readAllACStrength(HTIRS2, acS1, acS2, acS3, acS4, acS5 ))
        break; // I2C read error occurred
// You want to use the AC readings as the IR beacons that are on the field are modulated at 1200hz
__________________
FTC Team 72 - No site
FRC Team 399 - http://www.team399.org
2010 Rockwell Collins Innovation in Control Award - (Use of the CAN bus, among other reasons) Phoenix, Arizona!

Last edited by biojae : 24-09-2011 at 02:27.
Reply With Quote