Using QTR-8rc for edge of table detection

What sort of value should I get when the sensor is over the edge of a table that is 4 inches above the floor. A timeout ? Im using the arduino library pololu provides.


The time it takes for the output voltage to decay with this sensor will depend on the surface the light is reflecting off of and could also be affected by things such as ambient lighting. However when used with the default timing values in our Arduino example code on most normal surfaces, I would generally expect a timeout at that sort of distance.

You can experiment with the values the sensors return by using the QTRRCRawValuesExample code included in our Arduino QTR Library. If you load this code on your Arduino, you can use the Arduino IDE’s serial monitor to see the decay times returned by the sensor in real time and hold the sensor at various distances above the floor to find the distance where timeouts begin to occur.