Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

Sign In (https://www.hackster.io/users/auth/arduino?current_site=arduino&setup=true&

redirect_to=%2Fprojecthub%2Fvinicius-lopes%2Fparking-sensor-with-arduino-53e598)

Parking Sensor with Arduino © LGPL


(http://opensource.org/licenses/lgpl-license)

This parking sensor with Arduino is an easy project.

1 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

parking (/projecthub/projects/tags/parking)

sensor (/projecthub/projects/tags/sensor)

42,934 VIEWS 14 COMMENTS 44 RESPECTS

COMPONENTS AND SUPPLIES

2 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

×
(/
p
r
oj
e
c
t
h
u
b
/
p
r
o
d
u
c
ts
/
b
u 1
y (/pro
/ jecth
4 ub
1? /pro
s ducts
Arduino UNO = /buy
(/projecthub/products  (/projecthub
B /41?s
/buy/41?s=BAhJIhI0NjI2N /products
(/projecthub A =BAh
ixQcm9qZWN0BjoGRUY /buy/41?s=BAhJIhI
/products hJ JIhI0
%3D%0A) 0NjI2NixQcm9qZW
/buy/41?s=BAhJI Ih NjI2
N0BjoGRUY

3 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

×
(/
p
r
oj
e
c
t
h
u
b
/
p
r
o
d
u
c
ts
/
b
u
y
1
/
(/pro
4
jecth
2
ub
7
/pro
5
ducts
0
Buzzer (/projecthub /buy
?
/products /427  (/projecthub
s
/buy/42750?s=BAhJIhI0N 50?s /products
(/projecthub =
jI2NixQcm9qZWN0BjoGR =BAh /buy/42750?s=BA

4 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

×
(/
p
r
oj
e
c
t
h
u
b
/
p
r
o
d
u
c
ts
/
b
u
y
1
/
(/pro
4
jecth
2
ub
7
/pro
4
ducts
2
Jumper wires (generic) /buy
?
(/projecthub/products /427  (/projecthub
s
/buy/42742?s=BAhJIhI0N 42?s /products
(/projecthub =
jI2NixQcm9qZWN0BjoGR =BAh /buy/42742?s=BAh

5 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

×
(/
p
r
oj
e
c
t
h
u
b
/
p
r
o
d
u
c
ts
/
b
u
y 1
/ (/pro
8 jecth
9 ub
3 /pro
Ultrasonic Sensor - HC- ? ducts
SR04 (Generic) s /buy
 (/projecthub
(/projecthub/products = /893
/products
(/projecthub /buy/893?s=BAhJIhI0NjI2 B ?s=B
/buy/893?s=BAhJI
/products NixQcm9qZWN0BjoGRUY A AhJIh
hI0NjI2NixQcm9qZ

6 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

APPS AND ONLINE SERVICES

Arduino IDE 
(https://www.ar (https://www.arduino.cc (https://www.arduino.cc
duino.cc /en/main/software) /en/main/software)
/en/main
/software)

ABOUT THIS PROJECT

This easy Arduino project makes a parking sensor.

#include <Ultrasonic.h>
Ultrasonic ultrasonic(6,5);
// pin 6 trig , pin 5 echo
const int buzzer = 7;
void setup(){
pinMode(buzzer,OUTPUT); // pin buzzer
}
void loop(){
int dist = ultrasonic.Ranging(CM);
if (dist < 100) { distance
tone(buzzer,1000);
delay(40);
noTone(buzzer);
delay(dist*4);
}
delay(100);
}

7 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

 PREVIOUS • •
NEXT

CODE

hardware C/C++   (/PROJECTHUB/CODE_FILES/124561/DOWNLOAD)

// 6 trig , 5 echo

18
17
16
15
14
13
12
11
10
21
20
19
9
1
2
3
4
5
6
7
8

8 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

#include <Ultrasonic.h>
Ultrasonic ultrasonic(6,5);// 6 trig , 5 echo

const int buzzer = 7; // pin buzzer

void setup(){
pinMode(buzzer,OUTPUT);

void loop(){

SCHEMATICS

h
a
r
d
w
a
r DOWNLOAD (HTTPS://HACKSTERIO.S3.AMAZONAWS.COM/UPLOADS/ATTACHMENTS/322818/UNTITL
e

9 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

COMMENTS

Please log in (/projecthub/users/sign_in?id=46266&m=project&


reason=comment&redirect_to=%2Fprojecthub%2Fvinicius-lopes%2Fparking-
sensor-with-arduino-53e598%23comments) or sign up (/projecthub/users
/sign_up?id=46266&m=project&reason=comment&
redirect_to=%2Fprojecthub%2Fvinicius-lopes%2Fparking-sensor-with-arduino-
53e598%23comments&source=popup) to comment.

Ivan Sanchez manzano (/projecthub/ivan0909)


4 years ago
(/pr
Ioject
tried to build one to help my parking skills but Arduino IDE get an error in this
line.
hub
"int dist = ultrasonic.Ranging(CM);", any idea about this?

10 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

viniciuslindoss (/projecthub/viniciuslindoss)
4 years ago
(/pr
You
ojectdownloaded the library Ultrasonic?
hub
/vini
ciusli
ndos Ivan Sanchez manzano (/projecthub/ivan0909)
s) 4 years ago
(/pr
Yes,
ojectbut I dont know if its the correct one. Which one are you using?
hub
/iva
n09
09)
Tarantula3 (/projecthub/tarantula3)
3 years ago
(/pr
Have
oject a look at this one: https://diyfactory007.blogspot.com/2018/04/diy-
arduino-based-car-parking-assistant.html
hub (https://diyfactory007.blogspot.com
/2018/04/diy-arduino-based-car-parking-assistant.html)
/tar
antu
This one is a more detailed version of this project
la3)
1 thank

celebiuluyol (/projecthub/celebiuluyol)
10 months ago
(/pr
Hello,
oject
Ihub
have doctoral degree and teach at university. I am preparing Arduino booklet
which
/cele includes some Arduino projects for teachers. These teachers are working
in the government schools. My booklet is not a commercial material. Teachers
biulu
can
yol) help from my booklet and can help students to make Arduino projects in
government schools.
Your project is very helpful. Can i use that project and pictures (similar pictures

11 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

more than one) in my booklet? Is there a copyright problem? I will show and
cite your page in the references section.
Thanks for your help.

viniciuslindoss (/projecthub/viniciuslindoss)
4 months ago
(/pr
Hi, sorry for the delay in replying, I came back to the community recently.
oject
You
hub can use yes in your book. I'll be thankful. Sorry my English, I'm from
Brazil
/vini
ciusli
ndos
s)
edger_swift (/projecthub/edger_swift)
9 months ago
(/pr
Thanks,
oject works well. Gonna use this for a part of my project.
Takes
hub an hour to set up Arduino and connection.
/edg
er_s
wift)
jovannyco (/projecthub/jovannyco)
5 months ago
(/pr
Hi! Did you get the code to work? I can't.
oject
hub
/jov
anny
co)
ashwini233 (/projecthub/ashwini233)
9 months ago
(/pr
hey
ojecti got these error mesages 'Arduino: 1.8.13 (Windows 8.1), Board: "Arduino
Uno"
hub
/ash
sketch_jan21a:1:10: fatal error: Ultrasonic.h: No such file or directory
wini

12 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

#include <Ultrasonic.h>

^~~~~~~~~~~~~~

compilation terminated.
exit status 1
Ultrasonic.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
'
please help

jovannyco (/projecthub/jovannyco)
5 months ago
(/pr
Hi. Im trying to see why the code is not uploading as I am getting the following
oject
error
hub message from the Arduino IDE
Arduino:
/jov 1.8.13 (Mac OS X), Board: "Arduino Uno"
anny
sketch_may10p:1:10: fatal error: Ultrasonic.h: No such file or directory
co)
#include <Ultrasonic.h>
^~~~~~~~~~~~~~
compilation terminated.
exit status 1
Ultrasonic.h: No such file or directory
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

mickhowe (/projecthub/mickhowe)
4 months ago

13 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

Today I had a look at this and have come to this solution:-


1: use this library:-
name=Ultrasonic
version=3.0.0
author=Erick Simões erick.simoes@live.com
(mailto:erick.simoes@live.com)
maintainer=Erick Simões erick.simoes@live.com
(mailto:erick.simoes@live.com)
sentence=Minimalist library for ultrasound module to Arduino
paragraph=Work with ultrasound module in a simple and light way.
Compatible with the modules HC-SR04, Ping))) and Seeed Studio sensor.
This library aims to resource efficiency and to simplify access to data.
category=Sensors
url=https://github.com/ErickSimoes/Ultrasonic
architectures=*
includes=Ultrasonic.h
2: Changed the line:-
int dist = ultrasonic.Reading(CM);
int dist = ultrasonic.read(CM);
I can now compile and run this sketch successfully. I hope this will help
someone
mick.

cristianradu2409 (/projecthub/cristianradu2409)
4 months ago
(/pr
Hello!
oject I want to make a system than can detect illegal parking and notify me.
Can
hub you help me with that ?
/cris
tianr
adu2
409) manosch (/projecthub/manosch)
4 months ago

14 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

Where could we download the ultrasonic library according to this project and
the link is not available in this project. Please help

mickhowe (/projecthub/mickhowe)
4 months ago
(/pr
Click
oject on Tools then Library Manager or use CTRL+SHIFT+I in the IDE, then
enter
hub UltraSonic in the Filter your search box.
Next
/mic scroll down the list of libraries until you reach the one I mentioned
above,
kho move your mouse cursor into its box and click the install button
mick
we)

TEAM VINICIUS LOPES (/PROJECTHUB/TEAMS/VINICIUS-LOPES)

(/projecthub/viniciuslindoss)
viniciuslindoss (/projecthub/viniciuslindoss)
4 PROJECTS 11 FOLLOWERS

FOLLOW (/PROJECTHUB/USERS/SIGN_UP?ID=155799&M=USER&REASON=FOLLOW&REDIR

PUBLISHED ON

July 8, 2017

 RESPECT PROJECT (/PROJECTHUB/USERS/SIGN_UP?ID=46266&M=ARTICLE&REASON=RESPECT&RED

 WRITE A COMMENT

 Share

MEMBERS WHO RESPECT THIS PROJECT

15 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

(/projecthub/nathan-paternotte) (/projecthub/user398693) (/projecthub/mugabo-

emmanuel) (/projecthub/amit-kumar7) (/projecthub/shantam0810) (/projecthub

/kmuhammad381) (/projecthub/koushiknadimpally998) (/projecthub/jean2)

and 36 others

SEE SIMILAR PROJECTS


YOU MIGHT LIKE

SIMILAR PROJECTS YOU MIGHT LIKE

(/projecthub/SurtrTech/parking-radar- (/projecthub/iotboys/how-to-use-
sensor-bf2269?ref=similar& ds18b20-water-proof-temperature-sensor-
ref_id=46266&offset=0) 2adecc?ref=similar&ref_id=46266&
offset=1)

Parking Radar Sensor How To Use DS18B20 Water


(/projecthub/SurtrTech Proof... (/projecthub/iotboys
Project tutorial12byCOMMENTS
20,726 VIEWS SurtrTech 64
(/project...
RESPECTS Project
152,685 showcase
VIEWS 25 by Team IoTBoys
COMMENTS (
36 RESPECTS

16 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

(/projecthub/MichDragstar/ultrasonic- (/projecthub/smazee/iot-smart-jar-using-
sensor-with-alarm-lcd-and-temperature- esp8266-arduino-and-ultrasonic-sensor-
a5dbab?ref=similar&ref_id=46266& 9d765b?ref=similar&ref_id=46266&
offset=2) offset=3)

Ultrasonic Sensor with Alarm, IOT - Smart Jar Using ESP8266,


LCD and... (/projecthub Arduino and... (/projecthub
Project tutorial by MichDragstar (/proj... Project tutorial by Team Smazee (/proj
29,184 VIEWS 10 COMMENTS 38 RESPECTS 16,911 VIEWS 5 COMMENTS 18 RESPECTS

(/projecthub/shaddow1201/garage- (/projecthub/lagsilva/complete-digital-
parking-stop-light-04ac5d?ref=similar& clock-including-alarm-and-motion-sensor-
ref_id=46266&offset=4) da6b59?ref=similar&ref_id=46266&
offset=5)

Garage Parking Stop Light Complete Digital Clock


(/projecthub/shaddow1201 Including Alarm and...
Project showcase by Rich Noordam (/p... Project showcase by LAGSILVA (/projec
5,473 VIEWS 1 COMMENT 14 RESPECTS 31,595 VIEWS 37 COMMENTS 97 RESPECTS

17 of 18 10/12/21, 5:57 PM
Parking Sensor with Arduino - Arduino Project Hub https://create.arduino.cc/projecthub/vinicius-lope...

(https://www.arduino.cc)
Powered by
(https://www.hackster.io)

18 of 18 10/12/21, 5:57 PM

You might also like