This link included a lot of great history of the Sharp IR Distance detectors and the min and max ranges of different sensors.
You read data on the sensor like any other analog sensor
Download SimpleIR
To smooth out the incoming data simply output the average of the last ten readings
Download SmoothingIR
To calibrate the sensor output use the map method.
Download CalibrationIR
This processing sketch was used to graph the incoming byte data from the arduino
Download Processing
These were the actual sketches used in class and includes the serial.outs that have been removed from the examples above.
Download IR Total
Comments