Click here for a free subscription to "HDE" our site newsletter.

Arduino Distance Sensor Parts List

Get part 2 of the Arduino Distance Sensor Project

Arduino Distance Sensor Parts List

Click to get the latest installment to this project by subscribing free to HDE Magazine.

Here is a list of parts for the Arduino Distance Sensor project.

Arduino Uno Single Board Microcontroller

A computer on a board with everything you need to start running programs and interfacing with the real world. Includes CPU, flash, EEPROM and static RAM memory,digital and analog I/O, timers and more.

Ultrasonic Module HC-SR04 Distance Sensor For Arduino

Ultrasonic transmitter and receiver. Operates by sending out ultrasonic pulses of sound and measuring the time it takes to receive an echo.

1602 Keypad LCD module

Plug in LCD and Keypad shield for the Arduino Uno. Provides 2 lines of 16 characters on a backlit LCD display plus 6 small key switches that are easily accessible from software.

Mini Solderless BreadBoard

A 170 point mini breadboard is perfect for this project

Hook-Up Jumber Cable Wires

You can make these yourself with some flexible wire, solid copper wire and heat shrink sleeving if you can be bothered to spend the time soldering them all up. Why not make your life easier and buy a fistfull instead. They are not expensive.

Now subscribe to our newsletter and don't miss a thing

Comments (5)

Topic: Arduino Distance Sensor
Full StarFull StarFull StarFull StarFull Star 5/5 (4)
Full StarFull StarFull StarFull StarFull Star
Tony (US) says...
One quick question. How does the LCD know what to do? How do you make that connection from the Arduino to the LCD? That's the part I'm having trouble with, I can't figure out what pins from the Arduino that I need to connect to the LCD then the LCD to the Ultrasonic sensor
16th April 2018 4:47am
Full StarFull StarFull StarFull StarFull Star
Pavan kumar (India) says...
I was wondering if the same code can be used with a normal 16X2 lcd which comes without the keypad shield. What are the changes I need to do in order to make the same project run on a normal 16X2 display?
19th August 2017 9:00am
Full StarFull StarFull StarFull StarFull Star
MrMaint (US) says...
Very nice presentation. I think there are a couple of areas where you could simplify your code without changing it's function. Your 50us pulse is going to be high then low, then high, then low every 50us. Your call to your routine is nice, but the routine could be simplified... void trigger_pulse() { static volatile bool state=0; state=1-state;digitalWrite(trigPin,state); } And your routine for weighting the hits... for(i=0,i<RANGES,i++) { if(i!=found_hit) { ... Read More
23rd November 2016 7:29pm
Full StarFull StarFull StarFull StarFull Star
Bob Jones (US) says...
This code was just what I was looking for and then some. I am building some robot classes and needed logic like this to handle my obstacle sensor.

The inclusion of the LCD code got me over another hump as well.

I will be "cleaning up" this example to encapsulate its functionality a bit better and then incorporating it into my robot code. I will post what I have once it's working.
27th January 2016 1:41am
Steve (UK) says...
Hi Bob,

I'm pleased the article has helped. I would be very interested to see how your project turns out.

31st January 2016 1:36pm

Add Comment

* Required information
(will not be published)
Bold Italic Underline Strike Superscript Subscript Code PHP Code Quote Insert line Bullet list Numeric list Link Email Image Video
Smile Sad Huh Laugh Mad Tongue Crying Grin Wink Scared Cool Sleep Blush Unsure Shocked
Enter code:
Notify me of new comments via email.
Remember my form details on this computer.
I have read and understand the privacy policy. *
I have read and agree to the terms and conditions. *
Click here for a free subscription to "HDE" our site newsletter.