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

This is a guide for 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.

http://arduino.cc/en/Tutorial/RCtime and http://www.parallax.com/Portals/0/Downloads/docs/prod/compshop/qtilinesensorrev1.pdf

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