This Arduino project uses an ultrasonic sensor and IR remote to switch between modes and detect obstacles at different distance thresholds.
- IR remote to switch between:
- Mode 1: Any distance
- Mode 2: <= 100 cm
- Mode 3: <= 50 cm
- LCD feedback for obstacle detection
- Real-time distance measurement using HC-SR04
- Arduino Uno
- HC-SR04 Ultrasonic Sensor
- IR Receiver
- IR Remote
- LCD (I2C 16x2)
- Breadboard & Jumpers
See wiring_diagrams
to access the wiring diagrams.
See extras/ir_remote_codes.txt
for tested codes.
- Upload
obstacle_detector.ino
to your Arduino. - Connect the hardware as per the schematic.
- Use IR remote buttons:
- "1" → Mode 1 (Any distance)
- "2" → Mode 2 (<= 100cm)
- "3" → Mode 3 (<= 50cm)
- Watch the LCD for distance or obstacle alerts.
Install these in the Arduino IDE:
IRremote
by shirriff or z3t0LiquidCrystal_I2C
or
See libraries
to download the necessary libraries.
MIT License