Arduino Playground is read-only starting December 31st, 2018. For more info please look at this Forum Post

This is a tutorial on how to interface the Parallax QTI light sensor with the Arduino.

datasheet: http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/qtilinesensorrev1.pdf

The QTI sensor needs to be connected like this: the B label goes to ground, the W label goes to power, and the R label is the signal. I am using an Arduino Mega with the Sensor Shield so I just cut a servo cable and soldered it back together in the correct order.

I created my own library (link at the bottom) for both the QTI sensor and the Ping))) ultrasonic sensor.

If you do not want to use my library, you can use these pages which are what I based my library off of: RCtime? and http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/qtilinesensorrev1.pdf (the datasheet)

The QTI sensor returns low values for high reflectivity and high values for low reflectivity.

Library: http://www.megaupload.com/?d=Y6F7IHS6