Inspiration

Our inspiration for our project comes from all our team members' experience with the importance of healthy wrist habits. All four of us have a musical background, having studied the piano, and sought to gamify the healthy habits surrounding hand dexterity and wrist motion.

Playing Sonata

Sonata is a short musical dexterity game. As each of Sonata’s LEDs light up, users press the corresponding “keys”, nailing different chords to increase their score. The game’s difficulty can be increased or decreased by moving Sonata’s mounted joystick up or down. But play carefully – too many incorrect button presses could leave you listening to the end music earlier rather than scoring higher.

How we built it

Sonata uses six force-sensitive resistors as “keys” that the player can press down. As each resistor decreases in resistance when pressed, we get user input in real time by using a voltage divider and an Arduino analog input pin to continuously measure the voltage drop across each resistor.

In fact, the pressure sensors are not unlike piano keys, and pressing down different combinations of sensors is reminiscent of piano chords. However, unlike the keyboard, the buttons are arranged in a shallow arc following the natural curve of a resting hand position. This helps prevent the player from having to splay out their fingers, which could stress the tendons over a long period of time. In order to guarantee an ideal wrist position, we used a plastic insert that could support the lower arm and maintain good posture without interfering with game play.

Challenges we ran into

We developed our code incrementally to test functionality at different stages of hardware progress. Initially, the LED pattern indicated for only one sensor to be pressed. This first challenge raised some coding challenges and interesting cases of what to do with different combinations of user input. For instance, the game logic had to deal with correct button presses, missed button presses, and incorrect button presses. Later on, we implemented the code for the LED pattern to display several positions simultaneously and the corresponding game logic. This required generalization of our previous code. The use of an OLED display introduced some roadblocks because we had to learn how to properly configure the device using I2C. Overall, the evolution of our project over time meant the software had to catch up on several occasions.

What we're proud of

  • The ability of Sonata to correctly register and score multiple-key chords and provide fun, simple gameplay
  • The exterior design of Sonata, resembling a grand piano
  • The satisfying end music!

What we learned

The most valuable thing we learned was how to work efficiently together as a team during a hackathon. As time progressed, it became common practice for us to share the task of coding different parts of the program and putting together the hardware in a beneficial manner.

Built With

Share this project:

Updates