Parking Indicator

SRJT09103

Jugaadu's father works in an office which has many employees. Every day his father faces a problem in parking his vehicle as usually he doesn't know whether a particular parking space is occupied or not. Jugaadu wants to help his father. So let us help Jugaadu as well?

Bag Items:

  1. Arduino UNO
  2. Arduino UNO Cable (A to B)
  3. LED
  4. IR Sensor
We can make use of an Arduino UNO based system which glows a LED as soon as it detects the obstacle i.e vehicle in this case. Obstacle detection can be done using IR sensors which gives input to the Arduino UNO. Now the LED will glow indicating that the particular parking space is occupied.

    int LED = 13;
int obstaclePin = 7;  
int hasObstacle = HIGH;  
 
void setup() {
  pinMode(LED, OUTPUT);
  pinMode(obstaclePin, INPUT);
  Serial.begin(9600);  
}
void loop() {
  hasObstacle = digitalRead(obstaclePin); 
  if (hasObstacle == LOW)
  {
    Serial.println("Stop something is ahead!!");
    digitalWrite(LED, HIGH);
  }
  else
  {
    Serial.println("Path is clear");
    digitalWrite(LED, LOW);
  }
  delay(200);
}