A simulated workplace environment where to demonstrate OO skills by interpreting and interacting with modern software requirements.
This is an implementation of the car park project without using Raspberri PI.
- Clone the project onto your computer using
git clone
- Change to the cloned repository's directory:
cd civ-ipriot-proj-carpark
- Create virtual environment
python3 -m venv .venv
Then activate the virtual environment:
- On Linux/macOS:
source .venv/bin/activate
- On Windows:
.venv\Scripts\activate
- Install the SmartPark project in development mode using:
pip install -e .
- Navigate to "without_pi" directory using cd command
cd without_pi
The folder contents are listed below. You'll need to make sure mqtt broker service is running on default port (1883) on localhost or update "toml_no_pi_configuration.toml" accordingly. Run "main01.py" and run "main02.py" at the same time e.g.
python3 main01.py
python3 main02.py
The directory contents:
│
├── without_pi/
│ ├── main01.py <-- run this
│ ├── main02.py <-- and that
│ ├── requirements.txt <-- project dependencies
│ ├── car_detector.py <-- classes CarDetector, Sensor
│ ├── car_park_display.py < -- class CarParkDisplay
│ ├── test_config.py <-- unit test
│ └── toml_no_pi_configuration.toml <-- toml configuration
main01.py
: Reads the configuration file and passes dictionary to the classes initializers. The window has 2 buttons for incoming and outgoing cars. Once the user clicks on either button a random temperature value, time stamp and the fact that a car has entered or exited the car park are sent via MQTT protocol.main02.py
: This is a "screen" with information for a car park manager or a car park user. This window receives data via MQTT protocol and updates available bays, temperature, last update time and current time.
Run test_config.py