You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set up a server that responds with the current parking lot usage or the closest parking lot when a client requests for it.
It will also receive trigger events from the Raspberry Pi on a car entering and exiting and relay the information to the clients.
Task Test:
Change current directory to server/ inside the root directory of the project
If you do not yet have the required virtual environment installed:
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
Open two other terminal windows with directory set to the same as above: server/
Activate the virtualenv in these windows as well using source venv/bin/activate
In one window, execute: python3 app.py local. *Note: This must be the first file you run. *
In another window, execute: python3 test_raspberry.py.
In the final window, execute: python3 test_client.py.
Wait for a few seconds, and you should see the client receiving the current state of the parking lots as JSON formatted output in its stdout in the window where you ran the test_client file.
The text was updated successfully, but these errors were encountered:
JohnnyD1
changed the title
Server communicating raspberry pi with application
Server
Sep 13, 2019
Only socket-based events for now, will add endpoints somewhere in the
next series of commits. The test_client and test_raspberry files are for
testing the server only, will not play a role in the eventual server.
Set up a server that responds with the current parking lot usage or the closest parking lot when a client requests for it.
It will also receive trigger events from the Raspberry Pi on a car entering and exiting and relay the information to the clients.
Task Test:
server/
inside the root directory of the projectvirtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
server/
source venv/bin/activate
python3 app.py local
. *Note: This must be the first file you run. *python3 test_raspberry.py
.python3 test_client.py
.test_client
file.The text was updated successfully, but these errors were encountered: