Professional Documents
Culture Documents
What is IR?
The Equipment
The Drivers
To use the IR sensor, you will need to download the latest RobotC 3rd Party Driver Suite (3.0) from botbench.com, if you havent already. For the V1 sensor, the driver is called hitechnic-irseeker-v1.h For the V2 sensor, the driver is called hitechnic-irseeker-v2.h
The easiest way to read the IR sensor is to create a function that takes the data from the sensor (outputted by the function HTIRS2readACDir(irSensor) within the driver) and returns it as an integer 1-9. You can then simply call this function to read the sensor.
Example Code