loading

This Instructable is about getting Tiny Tetris running on a 128x64 OLED display using an Arduino Nano or Uno.

Step 1: What You Need.

Arduino Nano or Arduino Uno:

Nano

Uno

Display:

OLED I2C SSD1306

Keypad:

AD Analog Keyboard Module

Note: other key pads and switch configurations could be used but you would need to change the code.

Some cables to connect things:

Cables

Step 2: Uno Wiring

Uno wiring:

Note: the key pad shown represents the pad in the parts list, I have not built the one shown but if you did it would be easy to get it working, only a few small changes would be needed in the code.

Fritzing Part

Step 3: Nano Wiring

Nano wiring:

Note: the key pad shown represents the pad in the parts list, I have not built the one shown but if you did it would be easy to get it working, only a few small changes would be needed in the code.

Fritzing Part

Step 4: The Code

If you are new to Arduino have a look at this to get started:

How to have fun with Arduino

Code attached and on GitHub below:

Code on GitHub - this has the most up to date code including Art work and Sound!

There is still a lot to be done with the code, see below:

High score functionality.

[Done] Better key pad control code.

Decent random number generator.

[Done] Start thinking about adding sound.

Create a letter font, create a proper system for rendering numbers and letters.

Tidy up code and optimize for memory, sort out the globals and types.

Create defines for all the magic numbers but they are useful for now.

Step 5: Have Fun!

<p>hello, badfeed. i have a question, if the change the lcd like that? how to program that? </p><p>thank you</p>
<p>Hi,</p><p>I don't know anything about that display and I imagine the system for comunicating with it is different to the SSD1306.</p><p>Sorry I can be of more help.</p><p>good luck with it though, nice looking display..</p>
<p>It's awesome! I made it w/ joystick/thumbstick controlled, demo: <a href="https://youtu.be/jGtNyWtdwFM" rel="nofollow">https://youtu.be/jGtNyWtdwFM</a></p>
<p>Cool :) </p><p>Good job getting the thumb stick working with it!</p>
<p>another christmas present idea!</p>
<p>Fun project for teaching people about Arduinos and displays.</p>

About This Instructable

3,980views

21favorites

License:

More by BADFEED:Tetris Clone with OLED SSD1306(I2C) for Arduino Nano / Uno 
Add instructable to: