A portable personal assistance built using the TI Tiva and Orbit Booster Pack. Made for our SE101 final project.
See it in action here!
By Aiden Benner and Lawrence Pan
- Display current time
- Display current weather depending on your location
- Reddit client
- Email client (read and reply to emails)
- Virtual keyboard
- Personal settings
- Two components: Raspberry PI and Ti Tiva.
- A Python server that runs on the Raspberry PI listens to the Serial port
- Ti Tiva prints
eventsto Serial to request for information. eg.GET_WEATHER:CA:Waterloo - The Python server extracts the
event_nameand theoptions. - Depending on the two parameters mentioned above, the server does a certain series of operations.
- If it is a
GETevent, python server will fetch data from the internet then send it back to Ti Tiva as a JSON string. - If it is an event with side effects (eg.
SET_NAME,SEND_MAIL), the python server will simply return a status code.
- Inspired by the redux library.
- Single source of truth, read-only state
- See
state.cpp
- Support asynchronous operations
- Unfortunately, the board we are using does not support multi-threading. However, if we have a more powerful board, here is what we will do.
- We supply an unique ID to the event we dispatch from Ti Tiva and then add the ID to a vector. eg.
GET_WEATHER:1fe3:CA:WATERLOO - We dispatch a python
asyncio coroutineto fetch the information - When we send the JSON string back to the Ti Tiva, we supply the
IDas one of the fields. - On Ti Tiva, we have one thread constantly polling on the serial.
- When it receives JSON, depending on the ID, we update the corresponding state variable (eg.
g_weather)
- Parsing JSON
- Hydrating JSON string on an embedded device is a little harder than just
JSON.parsein JavaScript
- Hydrating JSON string on an embedded device is a little harder than just
- Working with the OLED library