Vojťákovy stránky

Arduino-powered game console with LED matrix display

Overview
Implemented games and tools
Hack a Day Easter Egg
Downloads


Implemented games and tools

Until this moment I've implemented a graphical menu, a few games and essential system tools.

Graphical menu

Each game and system tool has its unique graphical symbol. Using Up/Down or Left/Right buttons you can choose one and launch it with Start button. Pressing Escape button returns you back to this menu.

Bouncing ball

The first game (or rather a toy) is a simple bouncing ball which reacts to the gravity component in X and Y axis. The more you tilt the console the larger acceleration it gets in that direction. After hitting the display border, it bounces back with about 1/3 of energy. Pressing Options button creates a blinking target randomly on the screen which you can try to hit with the ball. Pressing Start button re-calibrates the accelerometer in X and Y axis (only until you close this app).

Bubble level

Another toy is a bubble that moves according to the console tilt as if it was a bull's eye spirit level. Of course, its precision is limited due to rough matrix display, but it was my first try to use all three axes of the accelerometer and my second use of atan2 function. Start and Options buttons re-calibrate the accelerometer in X and Y or Z axis.

Dice

This is of course not a real game, but you can use this electronic dice in your favorite board game. Pressing Start button or shaking the game console starts “rolling a dice” which gradually slows down until it stays on one number. Randomness is guaranteed by using values from accelerometer as a seed in random function.

Maze

Finding a route through the maze can be simple if you can see the whole maze on a plan. But what if you stay inside the maze and have to find there something? The sight distance is limited simple by a size of the display. You (as one blinking dot) can walk through countless crossroads and crooked corridors using four buttons or an accelerometer (you can switch with Options button) to find your target (another blinking dot). If you are totally lost, you can use Start button to see in which part of the maze you and your target are.

Snake

What console would it be without a Snake game? Yes, here it is. The aim is picking food (blinking dots) and not to collide with yourself as you (as a snake) are growing. In this version of Snake game you can walk through display borders, which can be easy… at the beginning. If you were bored controlling a snake by buttons, you can use an accelerometer (switch with Options button). Yes, it is much more fun, as it is in a maze.

Paint

You can use red color and draw something… red. Yes, the options are really limited, but you can still prove your talent. By alternating light and dark dots it is possible to produce several shades of red. This app uses four of them which you can choose to draw something. You can save your artwork to one of four memory slots and it stays there even after restarting the console. The painting cursor is moved by four navigation keys and pressing Start button draws the dot with chosen color. Options button opens a dialog where you can choose a color or save/load an image.

Image viewer

This simple app allows you to walk through all of your images using Up/Down or Left/Right buttons. By holding one button you can view a simple animation. And if you want to fix something, by pressing Options button you can jump directly to Paint app.

Bargraph

This tool allows you to test the accelerometer. Each axis is represented by one bar, which can go up from the bottom for positive or down from the top for negative acceleration. Using normal gravity on Earth it should go approximately to 3/4 of the display height in each direction. Like in Bubble level toy you can use Start and Options button for calibration, but these values are rewritten after exit to the menu.

Accelerometer calibration

Even if the accelerometer is pretty stable, it can be sometimes necessary to re-calibrate the zero-value of each axis. Pressing Start button in horizontal position calibrates X and Y axis, while the Options button calibrates Z axis when the console is in vertical position. These new values are stored to the memory.

Battery indicator

It is good to know if the battery is almost empty or you can play for another few hours. It is shown by this simple graphical indicator. If the battery is empty, the console goes automatically to the sleep mode to protect the battery from over-discharging.

Brightness setting

By using Up/Down or Left/Right buttons you can choose between 16 brightness levels of the display. Pressing Options button saves the value to be used as default after restarting the console. (Of course, higher brightness level consumes the battery faster.)


Back to overview


Zpět na úvodní stranu

Vytvořil Vojťák • Admin • Aktualizace: 12. dubna 2016 v 15.03