Skip to content

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

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

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

Leave a Reply

%d bloggers like this: