-
Notifications
You must be signed in to change notification settings - Fork 1
Setup
mitgobla edited this page Apr 26, 2019
·
2 revisions
1. Set up the Raspberry Pi in headless mode. Follow this guide here.
2. Connect to the Raspberry Pi using PuTTY or any other SSH software.
3. Install git
,python3
,python3-pip
, and screen
:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install git python3 python3-pip screen
- Clone this repository:
git clone https://github.com/mitgobla/Traffic-Improvement TrafficImprovement
cd TrafficImprovement
- Install the required Python modules in
requirements.txt
:
cd Traffic-Light-Management
sudo python3 -m pip install -r requirements.txt
- Find out the IP address of the Raspberry Pi. Record it for use later.
hostname -I
- Create a new screen instance so the code can run after you have disconnected.
screen bash
# You should now be on a blank terminal
- Simply run
main.py
using Python.
# Make sure you're in the Traffic-Light-Management directory.
python main.py
- You should see this output in terminal:
# ...
Debugger PIN: XXX-XXX-XXX
Running on http://0.0.0.0:80/ Press (CTRL+C to quit)
- On a web browser on a device that is connected to the same network as the Raspberry Pi, navigate to the IP address you recorded earlier (the IP address of the Raspberry Pi).
- The web interface to configure the simulation should appear.