Skip to content
Advertisements

How to use HC-SR04 ultrasonic module to measure distance in cm and inch

 

 

Hello, here we are using the HC-SR04 ultrasonic module to measure distance, it’s a classic Arduino project to learn how to use the board, this module can measure up to 5m it’s quiet accurate and easy to calibrate as we saw in the video, you can integrate it in your projects, especially robots to detect obstacles or measure distance too while moving… (we don’t talk too much here) so here’s the wiring I used it’s only one wiring: 

1) Arduino Uno board

2) HC-SR04 ultrasonic sensor

3) LCD i2c screen (tutorial =  Arduino LCD I2C simple use and direct write from serial monitor)

4) Some jump wires and a breadboard

 

Wiring:

 

Library:

Download LCD i2c library  here

Codes:

Download all codes .ino format here

Advertisements

Yassine View All

Electronics, Automation engineering student... I try to share my little experience with other electronics amateur.

2 thoughts on “How to use HC-SR04 ultrasonic module to measure distance in cm and inch Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: