2.6K
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 = 0; 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 my finger over the sensor
729
886
629
1013
1012
1013
1010
51
48
47
1012
1013
1013
Links
http://www.onsemi.com/pub/Collateral/QRE1113-D.PDF