Facilitates temporary data storage and 2-way communication between two RPI units.
demo.mp4
For a design course's project, we built two functional prototypes of our proposed product to serve as a proof-of-concept.
Each prototype includes a Raspberry Pi running this web server, which enables both prototypes to communicate via calling each other's API endpoints.
The frontend was used for prototype showcase/presentation purposes and provides a visual representation of the data that is being stored on one prototype's web server and retrieved by the other prototype unit.
Used for temporary storage of data within the web server.
Name | Type | Description |
---|---|---|
speed |
Float |
Represents a user's speed in km/h. |
time |
Datetime |
Represents a specific time. |
Endpoint | Method | Description | Parameter(s) | Returned value(s) |
---|---|---|---|---|
/speed | GET |
Returns speed in String type |
NIL | String speed |
/updatespeed | POST |
Updates speed with the value within the request header. Returns a Response object for redirecting to the home page. |
Request header:{'speed': Integer} |
Response redirect() |
/time | GET |
Returns time , formatted to HHMM and in String type |
NIL | String time |
/decreasetime | POST |
Rolls back time by 1 hour. Returns a Response object for redirecting to the home page. |
NIL | Response redirect() |
/increasetime | POST |
Advances time by 1 hour. Returns a Response object for redirecting to the home page. |
NIL | Response redirect() |
/decreasespeed | POST |
Decreases speed by 3. Returns a Response object for redirecting to the home page. |
NIL | Response redirect() |
/increasespeed | POST |
Increases speed by 3. Returns a Response object for redirecting to the home page. |
NIL | Response redirect() |