Arduino IR Sensor Project Full Tutorial | Obstacle Detection System 🔥

Опубликовано: 10 Август 2026
на канале: Engineer & Electronics (Official)
81
like

-----------------------------------------------------------------
Arduino IDE (Download Link) - https://docs.arduino.cc/software/ide/
-----------------------------------------------------------------
Code -

Link :- https://drive.google.com/drive/folder...

Or Copy Code Given Below :-
int irSensor = 2; // IR sensor OUT pin
int led = 13; // LED pin

void setup() {
pinMode(irSensor, INPUT);
pinMode(led, OUTPUT);
Serial.begin(9600);
}

void loop() {
int sensorValue = digitalRead(irSensor);

if (sensorValue == LOW) { // Object detected
digitalWrite(led, HIGH);
Serial.println("Object Detected!");
} else { // No object
digitalWrite(led, LOW);
Serial.println("No Object");
}

delay(200);
}
------------------------------------------------------------------------------------------------------------
In this video, you will learn how to build a complete Arduino IR Sensor Project from start to finish. This project is perfect for beginners who want to understand how IR sensors work with Arduino.

I have explained:
IR Sensor working principle
Arduino connections step-by-step
Full coding with explanation
Real-time testing and output
This project can be used for:
Obstacle detection
Line follower robot
Automation systems

🔧 Components Used:
Arduino Board
IR Sensor Module
Jumper Wires
Breadboard

👍 If you like the video, don’t forget to Like, Share, Comment, and Subscribe!