Features:
detect motion
emitter: sends out a beam of human-invisible IR light
receiver: sensitive to that same light
compare to PIR: faster and better control of range
Observation:
object needs to be opaque
receiver and emitter have angle to read (approx. 10 degrees)
Sensor distance is approx. 50cm (sensitive in changes of alignment)
Recorded videos
Connect to Arduino:
transmitter: connect to power and ground.
Receiver: connect to power, ground, and digital pin.
Code:
/*
IR Breakbeam sensor demo!
*/
#define LEDPIN 13
// Pin 13: Arduino has an LED connected on pin 13
// Pin 11: Teensy 2.0 has the LED on pin 11
// Pin 6: Teensy++ 2.0 has the LED on pin 6
// Pin 13: Teensy 3.0 has the LED on pin 13