My light barrier CanonQM3-7237 detects whether a thin object (often paper) has been inserted into the slot or not. The barrier itself comes from an old printer and certainly regulated paper feeds or end points of motor routes. A total of 4 PINs are provided: I have extended the soldered flat ribbon with m/m Dupont cable to the breadboard and connected it as follows:
- first PIN with blue wiring as 5V <> 5V
- second PIN <> GND
- third PIN <> A0
- fourth PIN <> GND
With the help of the serial monitor from the Arduino IDE, the functionality is quickly clear: If an object is discovered, a corresponding message is output:
This is controlled using an IF statement:
if (sensorValue <=100) {
Serial.print(sensorValue);
Serial.println(" - thing blocking");
} else {
Serial.print(sensorValue);
Serial.println(" - NO thing blocks");
}
Let's see where I can use this component sensibly.
Comments