Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Car_Parking_System_LCD.ino
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#include <Servo.h> //includes the servo library
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

const int LCD_COLUMNS = 20;
const int LCD_ROWS = 4;

LiquidCrystal_I2C lcd(0x27, LCD_COLUMNS,LCD_ROWS);

Servo myservo;

Expand Down Expand Up @@ -35,7 +39,9 @@ pinMode(ir_back, INPUT);
myservo.attach(3);
myservo.write(90);

lcd.begin(20, 4);
lcd.init();
lcd.backlight();

lcd.setCursor (0,1);
lcd.print(" Car parking ");
lcd.setCursor (0,2);
Expand Down Expand Up @@ -115,6 +121,3 @@ if(digitalRead(ir_car4) == 0){S4=1;}
if(digitalRead(ir_car5) == 0){S5=1;}
if(digitalRead(ir_car6) == 0){S6=1;}
}