1
STATE FAIR PROJECT
Smart Parking System
2
• Overview• Software • Hardware• Code• Other Setup• Solving Problems• Benefits and Improvements
Agenda
3
Overview • Have you ever roamed around in the car parking
searching for a slot to park ? • The answer for this question is the project that I have I
made – Smart Parking System.• This parking lot can sense whether a car is present in
the slot or not. This will then be reported to a database which will in turn be shown in a webpage.
4
• The different types of software you will need to use are
◘ Arduino IDE◘ Xampp◘ Sublime Text Editor◘ Apache and MySQL
Software• In order to complete this
project successfully, one should know how to code in :
• PHP,SQL•C,C++•HTML5,CSS3,Bootsrap
5
• Code in Arduino.• Activate the
ultrasonic sensor.
Arduino
• Use PHP to post the values in the database.
• Design a webpage.
Web page• Sync Arduino with
internet and PHP. • Make a nice
display board to present the project.
Sync and Project Design
Title and Content Layout with SmartArt
6
SQL connection
This code creates a connection with the database. The code is pretty straightforward by itself.
7
Updating the values
This code basically updates the values to the database using the keywords UPDATE and SET inside the $sql variable. The keyword query runs the $sql functions.
8
Adding the data
This page selects each value from the database and produces it as a row in the foreach function. The header keyword refreshes the page continuously.
9
Arduino Code Part 1This is a basic Arduino code where I first include a few libraries and declare variables for the ultrasonic sensor. (1-58) Then I am defining the pins (whether they are an input or an output). The attach keyword says where I have the servo connected.
10
Arduino code Part 2
11
Arduino Code Part 3
In Arduino Code – Part 2, I am adding the ultrasonic sensor code using the keywords – pulseIn and digitalWrite.In Arduino Code – Part 3, I am making a connection with the PHP webpage.
12
Arduino Code - Part 4
In Arduino code part 3, I have created a connection between PHP and Arduino, so that I can push variables to the PHP code for all six sensors.
13
Xampp Server ApplicationThis is the application that you have to have in order to access a server and a database. You have to switch on the Apache and the MySQL boxes to control the database.
14
Project Architecture
15
Main Page – Part 1This is the main webpage where I am displaying all the necessary details and links. I am using Bootstrap to create a responsive webpage. In the first 11 lines, I am just adding in libraries. And in the next couple of lines I am creating the navigation bar.
16
Main Page – Part 2
In this part I am designing the carousel. Bootstrap is all about creating classes as it pre-coded in CSS3 and SASS. A carousel acts like a PPT in the webpage. I can also add this PPT to the carousel.
17
Main Page Part – 3
I am just continuing the carousel and there are also two buttons added. I have added an internal html CSS stylesheet using the <style> tag.
18
Main Page – Part 4
There is the continued CSS code until #149. And after that I have just add a bunch of columns to align the page better in the second picture.
19
Main Page – Part 5
I have added the same columns with different text. I have also added a footer for the webpage saying that my page is a copyright.
20
Webpage Display – Part 1
21
Webpage Display – Part 2
22
About Me Page – Part 1
23
About Me – Part 2
24
About Me – Part 3
25
About Me – Part 4
26
About Me – Part 5
27
• I have created an About Me page to just make it look like a professional webpage. • The new thing I have added was the animated progress
bar. • Another basic thing in the code was the columns for
making it responsive. • I have added a picture of myself and a notebook
background including the same navigation bar.
About Me Page - Explanation
28
About Me Display
29
Table Display
Parking Lot DataThis is the table which shows the data for the parking lot. If there is a green tick, then it means that the particular slot is available. If there is a red cross, then it means that the particular slot is occupied. This is the data-table which will show the car-drivers whether the slot is free or not.
30
• The main purpose of this project was to reduce the frustration of searching for a parking slot. • This can prove to be a great example of an IoT project. • My motive has always been, and will be, to make lives
easier with technology.
Benefits
31
• There are many improvements that can be made to this project• I had many ideas, like:•adding a timer, and finding out the time that car the had stayed there. •Sending warnings for a car crossing the time limit via SMS.•Finding out the car that has stayed there. Capturing photos of it and processing details to know the frequency of the visit.
Other Improvements
32
• I would surely improve my project to have all the features listed in slide #32.• I would like to add a computer to my project such as a
raspberry pi or a banana pi.
If Given More Time………..
33
THANK YOU