Tiny Game Of Simon On An ATtiny13

How much game can you get out of a chip with only 1 kB of flash memory and (five or) six free GPIOs? Well, you can get it to play the classic memory game, Simon. [Vojtak] is submitting this project for the 1 kB Challenge, but it looks like it’s already been used to teach simple microcontrollering to teenagers as well, so the code is actually straightforward to read, but full of nice features.

3924691481641919444Neat tricks include sharing button-press sensing and LED driving on the same pin, which was necessary to make everything work on such a small chip. A simple linear-congruential pseudorandom sequence provides the variation, and it’s seeded by slow-clock/fast-clock timing jitter, so you’re probably not going to see the same sequence twice. (It’s not the best random number generator ever, but it’ll do.) If that weren’t enough, high scores (and the random seed for the game) are saved to EEPROM so that you can brag to your friends or re-live your previous moments of glory.

The board is easily solderable together as well. This is a fantastic beginner project, with details in the code that everyone can learn from. It’s a great game, and a great demonstration of what you can do with a dollar’s worth of parts and 1 kB of code.

Continue reading “Tiny Game Of Simon On An ATtiny13”

USB Etch-a-Sketch-Style Mouse Is More Analog Than You’d Think

[Mitxela] wanted to build a different kind of mouse, one that worked like an Etch-a-Sketch toy with one X knob and one Y knob. Armed with some rotary encoders and a microcontroller, that shouldn’t be hard. But when you use a pin-limited ATtiny85, you are going to need some tricks.

The encoders put out a two-bit Gray code and close a button when you depress them. Plus you need some pins for the V-USB stack to handle the USB interface. [Mitxela] decided to convert the encoders  to output analog voltages using a simple resistor DAC. That would only require two analog inputs, and another anlaog input could read both switches.

One problem: there still wasn’t quite enough I/O. Of course, with AVRs you can always repurpose the reset pin as an analog pin, but you lose the ability to program the device at low voltage. And naturally, there’s a workaround for this too, allowing you to keep the reset pin and still read its analog value. You just have to make sure that value doesn’t go below about 2.5V so the device stays out of reset. Once that was in place, the rest went easy, as you can see in the video below.

Continue reading “USB Etch-a-Sketch-Style Mouse Is More Analog Than You’d Think”

Craziest Pin-Saving LCD Trick Ever!

We love squeezing every last bit of silicon goodness out of a tiny chip, or at least we delight in seeing it done. Today’s analog/digital hack is one of the sweetest we’ve seen in a while. And it’s also a little bit of a puzzle, so don’t scroll down to the answer until you’ve given the schematic a good think-over.

Continue reading “Craziest Pin-Saving LCD Trick Ever!”

Minimal Computer And Operating System: One Button, One LED

DUO BINARY is a very, very small computer system in every possible sense. It runs on an ATtiny84, which has even got “tiny” in its name. The user interface is a single button for data entry and a single LED for feedback, making this binary keyboard look frivolously over-complicated. It uses a devilish chimera of Morse code and a truncated ASCII to enter data, and the LED blinks the same back at you.

We’re guessing that [Jack Eisenmann] is the only person in the world who can control this thing, and you can watch him doing so in the video embedded below. Continue reading “Minimal Computer And Operating System: One Button, One LED”

Video Games In As Few Dimensions As Possible

First there were text games, then came 2D dungeons. When Wolfenstein 3D broke out on the gaming scene, it created quite a fuss. But if all you’ve got is a strip of WS2812 LEDs, those are a few dimensions too many.

[treibair] has started up a project on Hackaday.io to develop 1D video games to be played on a single LED strip. While the end application is something with a cool physical interface, probably driven by a microcontroller, prototyping is a lot easier on the big computer. He’s writing it in Processing, though, so that the transition to the Arduino is easier in the end.

There are a couple of other games out there in 1D, including Line Wobbler (YouTube) and, naturally, Wolfenstein 1D. We even saw a one-dimensional “snake” clone at Make Munich a few months back. (Would the author please stand up?)

We think the idea is a good one, and lining up everyone’s 1D gaming experience in one place would be a great help. So link up code and reviews in the comments!

Continue reading “Video Games In As Few Dimensions As Possible”

Smallest BASIC Computer?

This may be the most minimal computer that we’ve ever seen running BASIC. Hackaday.io user [Kodera2t] has been working through the history of computing, so after his 4-bit CPU, he stepped up his game to eight bits. It’s amazing how much can be done with so little. It’s basically a Z80 on a single PCB.

[Kodera2t] is careful to give credit where credit is due: the design of this computer is by [Grant Searle]. It’s amazing what you can do with an old CPU (6809), some SRAM, a controller-interface chip, and an EPROM for your BASIC. Check out the GitHub for the computer’s PCB files if you want to make your own — it’s a very hobbyist-friendly two-layer board with fat traces. Or you could put it all together on a breadboard. It’s that non-critical.

9767261466906678330

The other sweet touch is this monochrome CRT build that pairs up with the tiny computer.

[Kodera2t] is doing some really clever retro and minimalistic hacks, and putting them all up on Hackaday.io. You should really give his whole portfolio a look. We recently wrote up his experimentations with the Atmel ATtiny10 if you’re in the mood for something more modern.