IR Obstacle Detector
IR Obstacle Detector
User Guide
SKU: SSR1017
Brief Data:
1 www.handsontec.com
Functional Diagram:
2 www.handsontec.com
Upload the below sketch to Arduino board:
// 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 your hands near them, the Output LED on the module and the
LED for pin 13 on your Arduino board will light up. Open your serial monitor and vary the distance of your
hand while viewing the serial monitor. The output should look like the picture below:
3 www.handsontec.com
Handsontec. com
4 www.handsontec.com
The Face behind our product quality…
In a world of constant change and continuous technological development, a new or replacement
product is never far away – and they all need to be tested.
Many vendors simply import and sell wihtout checks and this cannot be the ultimate interests of
anyone, particularly the customer. Every part sell on Handsotec is fully tested. So when buying from
Handsontec products range, you can be confident you’re getting outstanding quality and value.
We keep adding the new parts so that you can get rolling on your next project.
P
Engineering Material Mechanical Hardware Electronics Components
5 www.handsontec.com