Arduino code for a Grand Piano Keys inspired mini arcade game.
Code is written for and tested on an Arduino Micro and Arduino Uno R3.
Forked from https://github.com/tasty-cakes1/piano-game.
These are the original instructions. I've stricken parts that I haven't confirmed or used in my implementation.
Press any key to start the game. A countdown will appear on the 7-segment
display, and then the game will start. Hit the key with the corresponding bar
displayed above it. You have 1 minute to hit as many keys as possible. If you
press an incorrect key the display will flash for a moment, and the time will
continue to count down. You are unable to accrue more points while the display
flashes.
The 7-segment display shows your score (# of keys pressed). When the time is up,
your score will flash. The display will show "High Score!" if you placed in the
top three high scores. You will then be able to enter your initials using the
left 3 keys to cycle through the alphabet for 3 characters. Once your initials
are input, press the rightmost key to submit your initials.
When idle, the display will cycle through the top 3 high scores and their
corresponding initials. To reset all of the high scores you can press and hold
all 4 keys for at least 15 seconds while the display is cycling through the high
scores. The display will show "Clear?" after the keys have been held for 10
seconds and then "Clear!" after 5 more seconds.
Adafruit LED Backpack Library by AdafruitI didn't use this.- MD_MAX72XX Library by majicDesigns
pitches.h
These libraries are available for download through the Arduino IDE Library Manager.
- 4 Brown Cherry MX Key Switches
- 4 MAX7219 Dot Matrix Module
0.56" 4-Digit 7-Segment Displaydid not use- Elegoo Uno R3
- M2 screws and nuts
- 3D-Printed Parts
- Piezo buzzer
- Diode
- 100Ω resistor
- Bamboo skewer