# Bop-it

Spring 2019

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

You are not logged in.

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.

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.

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.

Problem Status:
A Python Error Occurred:

Error on line 2 of python tag (line 61 of file /S19/ex07/bopit):



Enter the url for the video

SUBMIT ALL YOUR CODE AS A ZIP FILE BELOW (DOUBLE CHECK THAT YOU HAVE ZIPPED IT CORRECTLY). YOU WILL LOSE POINTS IF ALL FILES ARE NOT PRESENT!

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).