Загрузка...

Car Detected! Arduino Barrier Opens in 3 Seconds (HC-SR04 + SG90)

In this video, I built an Arduino automatic barrier gate that opens when a car gets close.
It uses an HC-SR04 ultrasonic sensor, an SG90 servo motor, and a 16×2 I2C LCD to show the distance and gate status.

✅ How it works

If distance ≤ 5 cm → gate opens

Stays open for 3 seconds

Then closes automatically

🧰 Parts used

Arduino Uno / Nano

HC-SR04 Ultrasonic Sensor

SG90 Servo Motor

16×2 I2C LCD

Jumper wires + breadboard

(Recommended) External 5V supply for the servo (share GND)

🔌 Wiring
HC-SR04 → Arduino

VCC→5V, GND→GND, TRIG→D9, ECHO→D10

SG90 Servo → Arduino

Signal→D3, 5V→5V, GND→GND

I2C LCD → Arduino

SDA→A4, SCL→A5, VCC→5V, GND→GND

💬 Want the full code? Comment “CODE” and I’ll share it!
#Arduino #UltrasonicSensor #ServoMotor #DIYProject #Electronics #Robotics #SmartGate #Engineering

Видео Car Detected! Arduino Barrier Opens in 3 Seconds (HC-SR04 + SG90) канала The Broke Engineer – Alex
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять