Monthly Archives: September 2013

Now It Plays the Tetris Theme Song!

Now it plays the Tetris theme song while you’re playing! An ATtiny85 is used to store the notes matrix and it listens to the ATmega328p on two pins to either play/stop the music or just pause it. I used the Arduino-Tiny core instead of the one from MIT HLT for the ATtiny85 since it supports the Tone() function in the Arduino library. It was actually quite hard to fit all the frequency values and duration values in a mere 512 bytes of RAM on the tiny85.

Here is a few more components that I’m considering to add to this Tetris game in the future:

-A 3-axis accelerometer (MMA8452Q) to provide another form of input;

-A LED bar graph, or just a couple LEDs, that could reflect the game progress/score.

-A separate small 8*8 or two 5*7 single colour LED matrices to display the next Tetris piece, and to allow the player to store the current piece.

2013-09-23 23.19.47

 

The Code:

ATmega328p: https://github.com/jl452/super-saiyan/tree/master/LED_Matrix_8x16_Tetris

ATtiny85: https://github.com/jl452/super-saiyan/tree/master/Tetris_Music

Advertisements

The New Look of My Arduino Piano

Changes made in this version:

Changed to another brand of breadboard, so it’s much more compact.

Added black and white key caps to make it more intuitive to play.

Replaced the 3W speaker with a 1W one to make the piano more compact yet still keeping the sound relatively loud.

2013-09-21 22.17.25