Can You Light Up All the LEDs on This Breadboard Game?
David Johnson-Davies' logic puzzle consists of five LEDs, five buttons, and an ATtiny85 MCU..
What can you really do with the ATtiny85’s limited five IO pins – six if you count the reset? As illustrated by the many projects involving this minuscule chip on David Johnson-Davies’ Technoblogy blog, quite a bit actually. For his latest post, he has come up with a game that can be made on a small breadboard using five resistors, five buttons, five LEDs, a capacitor, and of course, the tinyAVR microcontroller. A bit of hookup wire completes the circuit, for a very minimalistic puzzle experience.
The objective of the game is to figure out how to get all five LEDs to stay lit via the input buttons. This can be accomplished by pressing one button at a time, so no combinations are needed. If you get stuck, you can just cycle the power.
The code is included, and is only 16 lines long. Although a better programmer might be able to see the solution straightaway, it’s not immediately evident to me how to solve the puzzle – so don’t think that’s a total giveaway. As Johnson-Davies puts it, he didn’t make “any effort to make it understandable; after all that’s part of the puzzle!”
He’s using an ATtiny85 here, but an ATtiny25 or ATtiny45 should also work if that’s what you have available. If you can't figure it out, a solution will be presented as first Technoblogy post of the new year!
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!