- Arduino uno with USB Cable – 1
- Jumper wire male to male – 40 pieces
- Jumper wires Male to Female – 10 pieces
- Breadboard 830 points – 1
- 10k Potentiometer – 1
- 16*2 LCD Display – 1
- HC Sr-04 Ultrasonic sensor- 1
- Single Stand wire 1mt -1
HARDWARE REQUIRED
- Arduino uno with USB Cable – 1
- Jumper wire male to male – 40 pieces
- Jumper wires Male to Female – 10 pieces
- Breadboard 830 points – 1
- 10k Potentiometer – 1
- 16*2 LCD Display – 1
- HC Sr-04 Ultrasonic sensor- 1
- Single Stand wire 1mt -1
SOFTWARE REQUIRED
Arduino IDE 1.8.5 (Programmable Platform for Arduino Boards)
Click to download the software: https://www.arduino.cc/en/Main/Software
PIN DESCRIPTION
HC SR04 ULTRASONIC SENSOR
16*2 LCD DISPLAY
10K POTENTIOMETER
CIRCUIT DESCRIPTION
Connection for LCD 16*2 Display with Arduino uno
LCD 16 * 2 |
Arduino |
VSS |
GND |
VCC |
5V |
RS |
PIN 11 |
R/W |
PIN 10 |
E |
PIN 9 |
DB4 |
PIN 2 |
DB5 |
PIN 3 |
DB6 |
PIN 4 |
PIN 5 |
|
LED+ (A) |
5V |
LED- (K) |
GND |
Connection for HC SR-04 Ultrasonic Sensor with Arduino UNO
Ultrasonic Sensor |
Arduino |
VCC |
5V |
GND |
GND |
ECHO |
Pin 12 |
TRIG |
Pin 13 |
Connection for the potentiometer with LCD 16*2 and Breadboard
Potentiometer |
LCD |
Breadboard |
Pin 1 (left) |
5v |
|
Pin 2(mid) |
Pin 3 |
|
Pin 3 (right) |
Gnd |
CODE
Before coding, you have to install new ping library
https://drive.google.com/open?id=11gy_6v61-Eq0sAz8RJF_sn5Tl0g7z8Cj
Sketch > Include library > Manage Library > Search NEWPING library > download it
Or you download NewPing Library from other site.
https://drive.google.com/open?id=107vaWoBXZ8t6xtLExf7GQPetTcTP6glO
RUN SKETCH AND VERIFY OUTPUT
After compiling, uploading and running it
As far as the object goes far from the ultra-sonic sensor, Distance will be vary and measured distance will be show in LCD
in the Serial Monitor (Tools -> Serial Monitor or Ctrl + Shift + M) the sensor was sending correct data
Note: Must Set the baud Rate to 115200
Ping: 36 cm or the value shown in the serial monitor depends on the object distance from the ultra-sonic sensor.