The questions below are due on Sunday March 10, 2019; 11:59:00 PM.
You are not logged in.
Back to Exercise 05
If you are a current student, please Log
for full access to the web site.
Note that this link will take you to
an external site (https://oidc.mit.edu
) to authenticate, and then you will be redirected
back to this page.
In this design exercise you will generate a trivia game going off of the API briefly discussed in Exercise 04's Python Request Exercise. A user should be presented with trivia questions and they have to selet an answer. If the answer is right, they get a point. If the answer is wrong, they lose a point. The game should be able to run as long as the user wants (so it cannot use just a pre-defined/hard-coded set of trivia, but rather the trivia must come from the Trivia API). In addition, we want the system to keep track of the user's total record (the number of correct and incorrect answers across all of history...not just since the device turned on the last time. This will require persistent storage on the server.)
The system should have pieces existing both locally and on the class server. It should use a Python script to manage user scores as well as query the API for questions and to present them to the labkit. In addition, a user-side labkit-script (C++) should provide querying the server, rendering questions, and processing user input (as well as provide right/wrong feedback.)
We'll leave most details open-ended on this one and up to the user, but remember:
- Trivia must come from the open-trivia API
- Long-term statistics from user performance must be available and displayed on the lab kit LCD
- The system must allow the user to keep playing as long as possible (so there must be some repeatable state machine in place).
- Just to repeat the point in the first paragraph: Your system must be able to remember information through multiple power-cycles. This means persistent storage in the form of either a database or using the EEPROM on the ESP32 (we have not covered the latter, so database will probably be better here).
- The code must be implemented using non-blocking solutions (no usage of delay, etc)
True/False or Multiple choice question types are fine.
Any late factors are based on the timestamp for the last time that the URL is entered on the page or when the code is uploaded or when a comment is added/changed. If you change your URL after the deadline you will incur a late penalty. If you upload code after the deadline, you will incur a late penalty. If you comment after the deadline, you will incur a late penalty. One-Week Extensions DO NOT APPLY Design Exercises.
You must upload ALL CODE that you used in your design in one compressed folder This includes both server-side and embedded side. IN ONE COMPRESSED FOLDER. The system only takes the most recent upload, so if you upload a server file and then your embedded file, that will cause issues. Failure to upload code will result in signifcant point loss. This includes if you just forgot. Screenshots of your file's last modified date in My Computer are not evidence that the file has not been changed. They must be uploaded.
A Python Error Occurred:
Error on line 2 of python tag (line 47 of file /S19/ex05/trivia_game):
kerberos = cs_user_info['username']
Submit your ESP32 and server code as a zip file here:
This problem will not be marked as done until graded by the staff. If you have filled it out, it will appear as with a note saying "Work Submitted" on the main ex05 page.
Back to Exercise 05