Ultrasonic Distance System with Real-Time Data Visualization

This smart parking assistant utilizes an ultrasonic sensor and a moving average filter to provide stable distance tracking via an I2C LCD, LED traffic lights, and a reactive buzzer. Optimized with non-blocking code for zero-lag responsiveness and MATLAB integration, the project demonstrates essential principles of signal processing and efficient timing for embedded systems.

Dec 29, 2025

998 views

0 respects

Components and supplies

1

Ultrasonic Sensor - HC-SR04

1

16x2 LCD display with I²C interface

1

40 colored male-female jumper wires

1

5V Mini Traffic Light Red Yellow Green 5mm LED Display Module

1

Uno R3

1

Battery 5V (PowerBank)

1

Piezo buzzer

Apps and platforms

1

Arduino IDE

Project description

Code

Arduino IDE Sketch

cpp

You can just copy paste it :)

MATLAB Visualisation

matlab

Generates a live plot of the distance in cm

Downloadable files

MATLAB Visualisation

File for the Visualisation

visualHCSR04.m

Arduino Sketch

Code for HC-SR04, traffic light, buzzer, LCD, ...

sketchHCSR04_with_trafficlight.ino

Comments

Only logged in users can leave comments

falzinger

0 Followers

0 Projects

0