Main centres: | 1-3 business days |
Regional areas: | 3-4 business days |
Remote areas: | 3-5 business days |
This Infrared Obstacle Avoidance Sensors Module has a built-in IR transmitter 5mmLED and IR receiver 5mmLED that sends out IR waves and then looks for the reflected IR waves to detect the presence of any objects in front of the sensor module. The module has an on board potentiometer that let users adjust the detection range. This sensor can be used in light and complete darkness.
Infrared Obstacle Avoidance Sensors Module Features
EXAMPLE CODE: // IR Collision Detection Module // Henry's Benchint LED = 13; // Use the onboard Uno LEDint isObstaclePin = 7; // This is our input pinint isObstacle = HIGH; // HIGH MEANS NO Object In Front Of Sensorvoid setup() {pinMode(LED, OUTPUT);pinMode(isObstaclePin, INPUT);Serial.begin(9600);}void loop() {isObstacle = digitalRead(isObstaclePin);if (isObstacle == LOW) {Serial.println("OBSTACLE!!, DETECTED!!");digitalWrite(LED, HIGH);}else {Serial.println("clear");digitalWrite(LED, LOW);}delay(200);}