Spring 2019

The questions below are due on Sunday March 31, 2019; 11:59:00 PM.
You are not logged in.

If you are a current student, please Log In for full access to the web site.
Note that this link will take you to an external site ( to authenticate, and then you will be redirected back to this page.

Back to Exercise 07

1) Overview

In this Design Exercise, you will create a connected version of Bop-It, the wildly popular game where you are given a cue as to what to do and you must do it in a certain amount of time. This design exercise is based on an idea by Mark Chounlakone. Thanks, Mark. From all of us.

2) Spec

Your game is initiated with a button press. In your game, your ESP32's LCD should randomly show an icon/message indicating one of a number of actions:

  • Shout-It (the user must shout)
  • Bop-It (the user must bop their button)
  • Tilt-It (the user must tilt around the y or x axis by >30 degrees)
  • Spin-It (the user must spin around the z axis at least 90 degrees in any direction (use gyroscope readings for this))

For the Gyroscope to work, you need to update your ESP32 MPU9255 IMU library to THIS

The user must perform that action within an allotted time. If the correct action (and only the correct action) is carried out, then another icon shows up and the process repeats.

As the game progresses, the amount of time that the player has to make the correct shout/bop/tilt/spin should decrease, making the game harder. Because this will be an Internet-connected game, we suggest the following specs in case we want to compare data later. We suggest:

  • at the start, the time alloted to make the correct motion is 2 sec.
  • after every 4 moves, the time should decrease to 80% of its prior time (so 2 sec, 1.6 sec, 1.28 sec, etc.).

After a player fails to make the correct motion in the allotted time, their game is over, and their score is the number of correct bops/shouts/tilts/spins. In order to know who is the best Bop-It-er, your ESP32 should then upload the player's kerberos and score to the server to be stored in a database table which you need to manage and create. PLEASE ADHERE TO THIS TABLE STRUCTURE!

  • table name: bopit
  • fields:
    • ID - auto-generated integer that increments with each new record
    • time - auto-generated timestamp of when the score is submitted
    • kerberos - A string holding the player's kerberos
    • score - An int holding the # of correct bop-it moves

When not playing, your ESP32 should display a leaderboard of the top past scores and when those scores were obtains. List at least the top 2 scores, though more is better.

Upload a video of your system working, as well as all of your code and any necessary comments below.

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.

Problem Status:
A Python Error Occurred:

Error on line 2 of python tag (line 61 of file /S19/ex07/bopit):
    kerberos = cs_user_info['username']

KeyError: 'username'

Enter the url for the video


 No file selected

Enter any comments you may want us to know about. For example, if you started this exercise but don't want it graded, make a note here. Please hit submit on this question even if you don't have any comments.

Back to Exercise 07

This page was last updated on Wednesday March 20, 2019 at 07:20:25 PM (revision 5725856).
Course Site powered by CAT-SOOP 14.0.4.dev5.
CAT-SOOP is free/libre software, available under the terms
of the GNU Affero General Public License, version 3.
(Download Source Code)
CSS/stryling from the Outboxcraft library Beauter, licensed under MIT
Copyright 2017