This module can be used with Arduino Special Sensor Shield V4.0.You can do some simple design about it, "plug and play".
Arduino Digital IR Switch can detect things around 50-100cm.the transmitter and the receiver all in one.It adopts three cable interfaces,which is compatible with Sensor shield V4.form up to down are : black(GND), red (V power), and blue (s signal)connect with the sensor shield correctly.if there is something going across the Arduino Digital IR Switch, you can detect by reading the ArduinoI/O.(the value should be low when something going across)the Arduino code is :
int ledPin = 13; int switchPin = 8; int value = 0; void setup() { pinMode(switchPin, INPUT); pinMode(ledPin, OUTPUT); Serial.begin(9600); } void loop() { value = digitalRead(switchPin); if (HIGH == value) { digitalWrite(ledPin, HIGH); } else { digitalWrite(ledPin, LOW); } }