# Smart Parking System

**URL:** <https://forum.arduino.cc/t/smart-parking-system/1334780>\
**Category:** Programming\
**Created:** [December 22, 2024, 3:06pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780 "2024-12-22T15:06:33Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:06pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/1 "2024-12-22T15:06:35Z")

</div>

Hello guys, I am in urgent need of help.  
I have been working on my final year project "Smart Parking System using Arduino"  
Despite trying multiple times, my lcd display is unable to show any text after uploading the code. The display keeps showing 16 boxes.  
The code for my project is-:

```arduino
#include <Wire.h> 

#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,16,2);   

#include <Servo.h> 

Servo myservo;

int IR1 = 2;

int IR2 = 3;

int Slot = 4; //Total number of parking Slots

int flag1 = 0;

int flag2 = 0;

void setup() {

  Serial.begin(9600); 

    lcd.init(); //initialize the lcd

    lcd.backlight(); //open the backlight

 

 

pinMode(IR1, INPUT);

pinMode(IR2, INPUT);

  

myservo.attach(4);

myservo.write(100);

lcd.setCursor (0,0);

lcd.print(" ARDUINO ");

lcd.setCursor (0,1);

lcd.print(" PARKING SYSTEM ");

delay (2000);

lcd.clear();  

}

void loop(){ 

if(digitalRead (IR1) == LOW && flag1==0){

if(Slot>0){flag1=1;

if(flag2==0){myservo.write(0); Slot = Slot-1;}

}else{

lcd.setCursor (0,0);

lcd.print(" SORRY :( ");  

lcd.setCursor (0,1);

lcd.print(" Parking Full "); 

delay (3000);

lcd.clear(); 

}

}

if(digitalRead (IR2) == LOW && flag2==0){flag2=1;

if(flag1==0){myservo.write(0); Slot = Slot+1;}

}

if(flag1==1 && flag2==1){

delay (1000);

myservo.write(100);

flag1=0, flag2=0;

}

lcd.setCursor (0,0);

lcd.print(" WELCOME! ");

lcd.setCursor (0,1);

lcd.print("Slot Left: ");

lcd.print(Slot);

}

```

---

<div class="post-metadata">

**Author:** ![UKHeliBob](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ukhelibob/32/215663_2.png) [@UKHeliBob](https://forum.arduino.cc/u/UKHeliBob)\
**Post date:** [December 22, 2024, 3:10pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/2 "2024-12-22T15:10:45Z")

</div>

Welcome to the forum

Your topic has been moved to the Programming category of the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'  
  
Use **code tags** (the \< CODE/ \> icon above the compose window)&nbsp;to make it easier to read and copy for examination   
  
[https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum)

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [December 22, 2024, 3:12pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/3 "2024-12-22T15:12:29Z")

</div>

> [@anon87500744](#):
>
> Despite trying multiple times, my lcd display is unable to show any text after uploading the code. The display keeps showing 16 boxes.

you might need to turn down the contrast potentiometer...

* * *

Please correct your post and add code tags around your code.

There is a small pencil ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/4/9/149dbc7ac50c56bee5ba7e5d09e723c8acd5a1bc.png) below your existing posts.

- click on this pencil ➜ that will let you edit your post.
- Select the part of the text that corresponds to the code
- Click on the `<code/>` icon in the toolbar to indicate that it is code
- click ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/4/9/149dbc7ac50c56bee5ba7e5d09e723c8acd5a1bc.png) Save Edit

(Also make sure to properly indent the code in the IDE before copying and pasting it here. This can be done by pressing ctrlT on a PC or cmdT on a Mac)

---

<div class="post-metadata">

**Author:** ![sterretje](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sterretje/32/391294_2.png) [@sterretje](https://forum.arduino.cc/u/sterretje)\
**Post date:** [December 22, 2024, 3:13pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/4 "2024-12-22T15:13:34Z")

</div>

Please edit your post, select all code and click the \<CODE/\> button to apply code tags; next save your post.

Code tags make it easier to read the code, easier to copy the code and the forum software will display it correctly.

* * *

Have you verified that 0x27 is indeed the correct address?  
Have you tried to adjust the potentiometer on the I2C module?

Start with a simple example to get the LCD working, not your own code.

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:20pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/5 "2024-12-22T15:20:24Z")

</div>

I have checked the i2c address through the serial monitor, it is showing me "0x27" after scanning.  
Also, I adjusted the potentiometer on my i2c module to check the contrast on the lcd display but the only thing it is showing me is the 16 boxes.

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:22pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/6 "2024-12-22T15:22:49Z")

</div>

Well I tried doing that, I adjusted the contrast multiple times but the 16x2 lcd display is not showing me the text. It's only showing the boxes on the top row.

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [December 22, 2024, 3:30pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/7 "2024-12-22T15:30:15Z")

</div>

follow @sterretje's comment

➜

> [@sterretje](#):
>
> Have you verified that 0x27 is indeed the correct address?  
> Have you tried to adjust the potentiometer on the I2C module?
> 
> Start with a simple example to get the LCD working, not your own code.

ps: thanks for fixing the first post

---

<div class="post-metadata">

**Author:** ![Zardof](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardof/32/1126726_2.png) [@Zardof](https://forum.arduino.cc/u/Zardof)\
**Post date:** [December 22, 2024, 3:31pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/8 "2024-12-22T15:31:56Z")

</div>

Are you using your arduino to power this project?  
Can you show circuit diagram?  
G

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:33pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/9 "2024-12-22T15:33:07Z")

</div>

![Circuit Diagram](https://europe1.discourse-cdn.com/arduino/original/4X/3/b/c/3bcae88178d29823b5f965f8be29b6a339e1e3b1.png)

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:35pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/10 "2024-12-22T15:35:36Z")

</div>

[![](https://europe1.discourse-cdn.com/arduino/original/4X/6/b/d/6bd1e7fea0417ad3e1882c270efd681177b288a8.jpeg "How to make car parking system using arduino | Automatic car parking system | Arduino Project") ](https://www.youtube.com/watch?v=P64CoHCSD6w)

I have followed this video while making my project. My 16x2 lcd display is soldered with i2c module. After doing all the connections and uploading the code, the display keeps showing the boxes instead of loading the text on the screen

---

<div class="post-metadata">

**Author:** ![Zardof](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardof/32/1126726_2.png) [@Zardof](https://forum.arduino.cc/u/Zardof)\
**Post date:** [December 22, 2024, 3:42pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/11 "2024-12-22T15:42:19Z")

</div>

Try running your program without the servo connected.  
Does the display work now?  
G

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 3:51pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/12 "2024-12-22T15:51:00Z")

</div>

I have disconnected my servo motor along with the ir sensors. I only used breadboard and arduino uno for my lcd display. The display is still showing the boxes after getting ON and after uploading the code.

---

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [December 22, 2024, 3:58pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/13 "2024-12-22T15:58:38Z")

</div>

I build your project as a WOKWI-simulation.

The code seems to be correct. At least for the display. In the WOKWI-simulation your code works. So it is more likely a hardware-problem.  
If you really want help with this you have to post a picture of your real hardwar-setup and a **NON** -Fritzing-schematic.

[How to quickly draw a professional schematic](https://forum.arduino.cc/t/how-to-provide-an-easy-to-read-schematic-and-how-not/989506)  
The real picture shall be taken from vertically above the Arduino so it will be easy to see to what IO-pins do you have connected what.

GND-wire black or blue  
Vcc-wire red  
Signal-wires with different colors (than blue, black and red)

You should post a link to the datasheet of your I2C-LC-display or at least the link where you bought it from.

On a Arduino-Uno-board the SDA-pin of the LCD must be connected to the A4-pin on the arduino  
and the SCL-pin must be connected to A5-pin on the arduino

> **[Arduino-parking-system-001 - Wokwi ESP32, STM32, Arduino Simulator](https://wokwi.com/projects/417985951859956737)**
>
> Run IoT and embedded projects in your browser: ESP32, STM32, Arduino, Pi Pico, and more. No installation required!

---

<div class="post-metadata">

**Author:** ![Zardof](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardof/32/1126726_2.png) [@Zardof](https://forum.arduino.cc/u/Zardof)\
**Post date:** [December 22, 2024, 4:33pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/14 "2024-12-22T16:33:44Z")

</div>

Post #4 suggests adjusting the contrast pot on the back of an i2c display. Have you?  
G

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 4:42pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/15 "2024-12-22T16:42:31Z")

</div>

Yes, I did.

---

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [December 22, 2024, 4:51pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/17 "2024-12-22T16:51:57Z")

</div>

You should really post a picture of your hardware.  
This will help a lot. Without a picture the users that want to help you are forced to do all kinds of speculations like

might be a connection-problem if you use a bread-board with divided Vcc/GND-rails  
etc. etc. etc.

---

<div class="post-metadata">

**Author:** ![anon87500744](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anon87500744](https://forum.arduino.cc/u/anon87500744)\
**Post date:** [December 22, 2024, 5:18pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/18 "2024-12-22T17:18:41Z")

</div>

![Hardware Setup](https://europe1.discourse-cdn.com/arduino/original/4X/2/e/8/2e8891e8445a7acf610077e2d181e3fa3dabb608.jpeg)

---

<div class="post-metadata">

**Author:** ![Zardof](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/zardof/32/1126726_2.png) [@Zardof](https://forum.arduino.cc/u/Zardof)\
**Post date:** [December 22, 2024, 5:34pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/19 "2024-12-22T17:34:16Z")

</div>

That display looks very bright. Try turning the contrast down.  
Any joy?  
G

---

<div class="post-metadata">

**Author:** ![J-M-L](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/j-m-l/32/766245_2.png) [@J-M-L](https://forum.arduino.cc/u/J-M-L)\
**Post date:** [December 22, 2024, 5:48pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/20 "2024-12-22T17:48:19Z")

</div>

He said he did try

Maybe the pot is broken ➜ need to check the soldering

@anon87500744 can you post a picture of the back of your LCD?

---

<div class="post-metadata">

**Author:** ![StefanL38](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/stefanl38/32/713548_2.png) [@StefanL38](https://forum.arduino.cc/u/StefanL38)\
**Post date:** [December 22, 2024, 5:53pm UTC](https://forum.arduino.cc/t/smart-parking-system/1334780/21 "2024-12-22T17:53:10Z")

</div>

The picture you have posted is again delaying things.  
You should take time for carefully take the picture

Here is the reason why. Look at the questions directly written into the picture.

The important IO-pins are not readable. This forced me to look up the Pin-out of the arduino-Board. And for clarity adding the abbreviations to the picture.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/1/1/a/11ad90ed3c5f540b02949b292a8c94b15aa96708.jpeg)

typically these potentiometers can be turned more than one rotation  
with applying only a small torque. As long as you feel a rather small resistance while rotating the contrast-potentiometer you can go on rotating it.

[Next page](https://forum.arduino.cc/t/smart-parking-system/1334780.md?page=2)
