Imagine a parking lot with 100 parking spaces, what you do
nowadays is physically check the status(vacant/Busy) of each and every parking space resulting to loss of fuel as well as time. But what if I provide you with a solution in which the status of each and every parking space is visible to you as soon as you enter the parking lot telling you which parking space is free and which is not (like Site 1 is free, Site 83 is Free), plus if the site is free a green led would glow and if not, a red one would.
Step 1: Materials
Hardware (For only one site)-
1 Arduino Uno Board
1 16*2 LCD screen
1 Proximity Sensor
1 Red LED
1 Green LED
A Dummy Car
Download Arduino ide from Arduino.cc. Install and Run it on
your computer. Arduino Ide Works on syntactical principles of C/C++.
Step 2: Schematics and Circuit Diagrams
The LCD alone would consume up 11-12 pins
The working of potentiometer in LCD is just to adjust the brightness of the screen. We can exclude the potentiometer by declaring an exact amount of brightness.
Attach the pins as per the diagram
now for other components.
one pin goes to high(5v), one to low( gnd) and the last one is for Analog output (pin A0).
connect One pin of Green as well as Red LED to pin 7 and pin 8 wheres as other one to gnd
Step 3: Code
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
Serial.println("LCD test with PWM contrast adjustment");
// set up the LCD's number of columns and rows:
// Print a message to the LCD.
lcd.print(“SITE 1 is free”);
lcd.print(“SITE 1 is not free”);
Step 4: Working
Consider an empty parking space (Green LED Glowing) with
Proximity Sensor connected over it. As soon as a car fills up the space, a signal is sent over to the Arduino board which in turns would make the red LED glow depicting that the site is filled and immediately a message on LCD would be displayed.