The Randomizer

Posted 2011.03.24 21.43 in Computers/Internet/Technology by Stephanie

After 3 months of on-and-off working on my thermostat project, it seems kind of funny to pop this one out in a couple hours in a single evening.

My second from-scratch Arduino-based project, is more or less an electronic version of the ‘Magic 8-Ball‘. Press one of the buttons and the screen fills up with random characters or numbers as it ‘randomizes’ ┬áitself, then after you release the button it presents the result on its LCD screen.

It has around 20 8-Ball-ish responses, though they’ve been edited to fit on the screen, modified a little to fit the format of The Randomizer speaking in the third person. For no good reason whatsoever.

Eagle-eyed obsessive readers (I know who you are) will recognize the enclosure and button board are from the 0.1 version of the thermostat. Having 4 buttons (the little one is just a reset button) and the 8-Ball only using one of them, I quickly came up with a use for the other three.

Forgive my nerdiness… when pressed, buttons 2, 3, and 4 will produce the result of rolling percentile, 1d20 and 1d10 dice instead of an 8-Ball phrase.

While on the subject of geekiness, for some extra geek points (and battery savings) the LCD screen’s backlight only comes on when in use, then after 30 seconds of disuse the backlight switches off.

Each of the 4 buttons goes to a digital pin, and there’s still some additional pins available so it could be expanded further. Though even with only the four existing buttons, it could be expanded by reading multiple buttons at once.

The Randomizer runs on 4 AA batteries, which will probably last for 2 or 3 kilo-whiles. You can build one of your very own; all you need is an Arduino, an LCD, a couple buttons and a box.

Here’s the source code, for your enjoyment and tinkering pleasure.

Leave a Comment