How to Make an Ultrasonic Ruler with Arduino UNO and HC-SR04

This is my first project, so please like the project and comment down below.

Feb 16, 2018

17273 views

9 respects

Components and supplies

1

Arduino UNO

1

Ultrasonic Sensor - HC-SR04 (Generic)

4

Jumper wires (generic)

1

Breadboard (generic)

1

Laptop or computer

1

USB-A to B Cable

Apps and platforms

1

Arduino IDE

Project description

Code

Ultrasonic ruler with inches, centimetres, and millimetres

arduino

This the code. Just copy it and paste it on your Arduino IDE. Comment down below how I can make this code better.

Ultrasonic ruler with inches, centimetres, and millimetres

arduino

This the code. Just copy it and paste it on your Arduino IDE. Comment down below how I can make this code better.

Downloadable files

Ultrasonic Ruler

Just wire the: VCC of Ultrasonic sensor ---> 5V in Arduino Trig of Ultrasonic sensor ---> Pin 2 in Arduino Echo of Ultrasonic sensor ---> Pin 4 in Arduino GND of Ultrasonic sensor ---> To GND in Arduino And then just copy and paste the code above in your Arduino IDE. To see the distance just go to Tools -> Serial Monitor or just put Ctrl+Shift+M or for mac just Command+Shift+M.

Ultrasonic Ruler

Ultrasonic Ruler

Just wire the: VCC of Ultrasonic sensor ---> 5V in Arduino Trig of Ultrasonic sensor ---> Pin 2 in Arduino Echo of Ultrasonic sensor ---> Pin 4 in Arduino GND of Ultrasonic sensor ---> To GND in Arduino And then just copy and paste the code above in your Arduino IDE. To see the distance just go to Tools -> Serial Monitor or just put Ctrl+Shift+M or for mac just Command+Shift+M.

Ultrasonic Ruler

Ultrasonic Ruler

The Ultrasonic ruler helps you to measure things with Ultrasonic sounds.

Ultrasonic Ruler

Comments

Only logged in users can leave comments

Imperial_Proggramer

0 Followers

0 Projects

Table of contents

Intro

9

0