/*

Program: Car_Park.ino

*/

#include <Servo.h>
#include <LiquidCrystal_I2C.h>

#define servoPin  8
#define inSensor  6
#define outSensor  7
int servoUp = 90;
int servoDown = 0;

LiquidCrystal_I2C lcd(0x27,16,2);
Servo gateServo;

void setup() {
  lcd.init();               // Initialize the lcd 
  lcd.backlight();          // Turn On LCD backlight

  pinMode(inSensor, INPUT);
  pinMode(outSensor, INPUT);
  gateServo.attach(servoPin);
  gateServo.write(servoUp);
}

void loop() {
  lcd.setCursor(0,0);
  lcd.print("Now 0 Angle ");
  gateServo.write(servoDown);
  delay(500);
  lcd.setCursor(0,0);
  lcd.print("Now 90 Angle");
  gateServo.write(servoUp);
  delay(500);
}