IR Infrared 3 - 100cm Obstacle Detaction Sensor Module
-
RM20.00
- Product Code: IR-3-100CM
- Availability: In Stock
The basic concept of IR(infrared) obstacle detection is to transmit the IR signal(radiation) in a direction and a signal is received at the IR receiver when the IR radiation bounces back from a surface of the object.
Features
Specifications
Test subject (5V)
- White wall : 100cm
- Black laptop : 20cm
- Finger : 18cm
- Palm : 30cm
- Ball pen: 20cm
Connect to Arduino
// IR Obstacle Collision Detection Module int LED = 13; // Use the onboard Uno LED int isObstaclePin = 7; // This is our input pin int isObstacle = HIGH; // HIGH MEANS NO OBSTACLE void setup() { pinMode(LED, OUTPUT); pinMode(isObstaclePin, INPUT); Serial.begin(9600); } void loop() { isObstacle = digitalRead(isObstaclePin); if (isObstacle == LOW) { Serial.println("OBSTACLE!!, OBSTACLE!!"); digitalWrite(LED, HIGH); } else { Serial.println("clear"); digitalWrite(LED, LOW); } delay(200); }
Move your hand towards the IR LEDs. As you near them, the Output LED on the module and the LED for pin 13 on your Arduino will illuminate. Open your serial monitor and vary the distance of your hand while viewing the serial monitor. The output should show "Clear" to "OBSTACLE!!, OBSTACLE!!".
Tags: IR Infrared