Hacks

A Colorful Way To Play Chess On An ATmega328

A Colorful Way To Play Chess On An ATmega328


We’ve all seen those chess computers that consist out of a physical playing field, and a built-in computer that would indicate where you should put its pieces while inputting the position of your pieces in some way. These systems are usually found in a dusty cardboard box in a back room’s closet, as playing like this is fairly cumbersome, and a lot depends on the built-in chess computer.

This take by [andrei.erdei] on this decades-old concept involves an ATmega328p-based Arduino Pro Mini board, a nice wooden frame, and 4 WS2812-based 65×65 mm RGB 8×8 LED matrices, as well as some TTP223 touch sensors that allow one to control the on-board cursor. This is the sole form of input: using the UP and RIGHT buttons to select the piece to move, confirm with OK, then move to the new position. The chess program will then calculate its next position and indicate it on the LED matrix.

Using physical chess pieces isn’t required either: each 4×4 grid uses a special pattern that indicates the piece that occupies it.  This makes it highly portable, but perhaps not as fun as using physical pieces. It also kills the sheer joy of building up that collection of enemy pieces when you’ve hit that winning streak. You can look at the embedded gameplay video after the break and judge for yourself.

At the core of the chess program is [H.G. Muller]’s micro-Max project. Originally ported to the Arduino Uno, this program outputs the game to the serial port. After tweaking it to use the LED matrix instead, [andrei.erdei] was then faced with the lack of memory on the board for the most common LED libraries. In the end, the FAB_LED library managed to perform the task with less memory, allowing it and the rest of the program to fit comfortably into the glorious 2 kB of SRAM that the ATmega328p provides.

Classic 8-bit chess engines are marvels of software engineering. Ever wonder how they stack up against modern chess software? Check out this article!



Source link

Click to add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Hacks

More in Hacks

Multiple 3D Printers, and One Pi to Rule Them All

HCFebruary 24, 2020

3D Printable Nameplates From Your Web Browser

HCFebruary 23, 2020

Introducing The XFM2: A New FM Synthesizer Board

HCFebruary 22, 2020

Stout Homebrew Radio Pumps Out 200W of AM Goodness

HCFebruary 21, 2020

Machine Inside of a Chip: How Sprite_TM Built the FPGA Game Boy Badge

HCFebruary 20, 2020

Gear up Your Gear Knowledge with Gears

HCFebruary 19, 2020

Copyright © HurtCafe.com 2016

Do NOT follow this link or you will be banned from the site!