Coder Social home page Coder Social logo

tetris's Introduction

Tetris

This ended up being a 30-inch by 60-inch Tetris game I hung on my cubicle wall at work for a while. It's running on an Arduino Uno, using 24-bit LEDs for display, with an NES controller for input.

One of the most interesting challenges was that with 800 24-bit LEDs, the total state of the game at any given time exceeds the memory capacity of the Uno, which means most LED-control libraries wouldn't work. I ended up storing the game state in a more compressed format, then calculating and streaming out the LED values on each tick.

Another interesting challenge was with the power. The LED strips require low voltage, but fairly high current. I ended up using an old ATX power supply to provide this, and had to try a couple different thicknesses of wire before I got one with a low enough resistance.

I initially wrote most of the game logic in .NET, so I could more easily debug that while isolating myself from the aspects of the Arduino and physical electronics that were newer to me. Then I modified the .NET code to run on a PC, but send data to the Arduino over a serial port for display purposes. And ultimately migrated all the code to the Arduino.

Check out a video

Still image

tetris's People

Contributors

jtriemstra avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.