In an era where touchscreen-based smartphones are ubiquitous, there was a time when people used to play games like Tetris and Snake in regular mobile handsets. Won’t it be interesting to redesign some of those retro-games by making your own screen with just LEDs and play along with your peers?
This is going be a very interesting challenge to anyone who wants to brush up/learn the basic concepts of programming along with side tinkering with microcontroller!
So, here is the challenge!
Your task would be to make a DIY gaming station using array of neopixel LEDs (link below) and write the program to for the following games:
-
Tetris
In this game, there are seven different kinds of blocks which fall in random order. The task is to align them in such a way that a row is completely lit with LEDs. On completing the row, it vanishes and the players get one point. The game is over once the stacked up pieces reach the top of the matrix and there is no more place to make another block fall. The user has three control option - moving right, left and rotating the pieces. [1]
-
Snake
In this game, the tail of the snake grows by one unit on eating the food. The game gets over once the snakehead touches its own body. The food gets randomly generated and the playing ground is permeable ie. on reaching the top, the head generates from the bottom. [1]
LED Snake using NeoPixel - YouTube
It’s up to you to either design your own remote controller or use an existing mobile application which can interface with Bluetooth to play the games.
The gaming station can enable one to pick up electronics, programming, and fundamentals of physics in an engaging and meaningful manner.
Here are some of the glimpses!
Useful links:
Snake
Tetris
http://cslibrary.stanford.edu/112/Tetris-Architecture.html
Materials
- Neopixel Leds ( Each pack has 50 LEDs. We daisy chained 4 of these to make the screen of 200 LEDs in total)
-
Arduino Uno + Jumper Wires
-
HC 05 Bluetooth module
Reference:
1.
http://www.hbcse.tifr.res.in/makerspace
2.The idea inspired by: