Week 2

Aims for week 2

The main goal for week 2 was to continue where we left off from week 1 by implementing the I2c 16x2 LCD into our smart parking-system and programming the rest of the logic into the Arduino.

1. LCD Display Setup

Integrated a 16x2 I2C LCD for real-time display of parking information.

Updated the display to dynamically show the number of available parking slots.




    The initial state of the LCD


 The state when the car park is already full




2.Ultrasonic Sensor Integration

Used two ultrasonic sensors to detect cars at the entrance and exit.

Created the MeasureDistance function for calculating object distance.

We tested the sensors by placing the toy cars at different distances from the sensors in order to determine an appropriate value for the detectionDistance variable, which is a threshold value measured in cm that the Arduino looks for so that the gate is triggered when the car is closer that the value of detectionDistance





3. Combining the sensors and servo motor with the LCD

We successfully integrated the LCD screen with the rest of the system to display all of the correct information. The screen is now capable of displaying the real time count of the number of spaces available which changes when a car enters or leaves the car park.

Section of code highlighting the use of the servo motor, LCD and ultrasonic sensors



Challenges Encountered

1. Problem: The LCD initially failed to display anything.
Solution: Adjusted the potentiometer on the back of the LCD module. Adjust until the screen gives a clear display of the desired information.

2. Problem: Ultrasonic sensors occasionally triggered when not intended due to the detection distance threshold being to high, we reduced the distance threshold so that the sensors are not triggered by other objects in the background.


Goals for the next week

1. Build a small simulated car park system.
2. Check again if the whole system can work after applying the components into the car park model.

 


Comments

Popular posts from this blog

Week 1

Week 4