The QRE1113 features an easy-to-use analog output, which will vary depending on the amount of IR light reflected back to the sensor. The QRE1113 IR reflectance sensor is comprised of two parts – an IR emitting LED and an IR sensitive phototransistor.
When you apply power to the VCC and GND pins the IR LED inside the sensor will illuminate.
Because dark colors will bounce back less light, the sensor can be used to tell the difference between white and black areas and can be used in robots as a line follower
Schematic/Connection/Layout
Code
[codesyntax lang=”cpp”]
int QRE1113_Pin = A0; void setup() { Serial.begin(9600); } void loop() { int QRE_Value = analogRead(QRE1113_Pin); Serial.println(QRE_Value); delay(1000); }
[/codesyntax]
Output
Open the serial monitor, the lower example readings were when I put a white piece of paper near the sensor
889
871
76
85
75
76
871
890
81
Links
http://www.onsemi.com/pub/Collateral/QRE1113-D.PDF