This project implements a simple car parking system using Arduino, IR sensors, a servo motor, and an LCD display. It monitors the availability of parking slots and controls access using the servo motor.
- Arduino Uno
- 2x IR Sensors
- Servo Motor
- LCD Display (16x2 characters) with I2C module
- Wire.h (for I2C communication with the LCD)
- LiquidCrystal_I2C.h (for controlling the LCD)
-
Arduino Connections:
- Connect IR Sensor 1 to Digital Pin 4.
- Connect IR Sensor 2 to Digital Pin 6.
- Connect Servo Motor to Digital Pin 9.
- Connect SDA pin of the I2C LCD Display to A4 on Arduino.
- Connect SCL pin of the I2C LCD Display to A5 on Arduino.
-
Power Supply:
- Power the Arduino board using a USB cable connected to your computer or an external power supply.
-
Assembly:
- Mount IR sensors in a position where they can detect incoming and outgoing cars.
- Attach the servo motor to control the parking barrier.
-
Arduino IDE:
- Download and install the Arduino IDE from arduino.cc.
-
Install Libraries:
- Open the Arduino IDE.
- Navigate to Sketch > Include Library > Manage Libraries....
- In the Library Manager, search for
LiquidCrystal_I2C
by John Rickman. - Click Install to install the library.
If you encounter an error during installation, you can manually download the library
- Extract the downloaded ZIP file into your Arduino libraries directory (usually found in
Documents/Arduino/libraries/
).
-
Upload Code:
- Open the
Arduino_Uno_file.ino
sketch provided in this repository. - Verify and upload the sketch to your Arduino board (select correct board and port under Tools menu).
- Open the
- Upon startup, the LCD will display a welcome message.
- IR sensors detect incoming and outgoing cars:
- IR Sensor 1 manages incoming cars.
- IR Sensor 2 manages outgoing cars.
- The system dynamically updates the number of available parking slots on the LCD.
- When all slots are full, the LCD displays a "Parking Full" message.
- The servo motor controls the barrier to allow or deny access based on slot availability.
- If you encounter issues with the LCD display or servo motor, ensure all connections are secure and configured correctly.
- Check the Arduino IDE serial monitor for debugging messages if needed.
- Developed by Zulqarnain Ahmed
- Feel free to reach out to me through my social media platforms on LinkedIn. LinkedIn Account