I ordered a number of infrared line trackers for my class in September. At 33 cents per sensor the price was awesome:
First things first I checked out the datasheet for them. Since I’m travelling I don’t have any resistors but based on the voltages I should be fine for a short test. Time to wire it up.
For the code the AnalogReadSerial example is all I need to test it out. The sensor worked great – when a dark object (i.e. phone case) was 1 cm away it was receiving a value of 0. When white paper was held 1 cm away a value of 1007 was received.
One of the tasks that my students will be required to complete is to build a variety of line following robots – from the simple (i.e. turn left if on black, turn right if on white) to the complex (PID – proportional integral derivative).