There’s an old saying that goes: when life gives you lemons, make lemonade. [lds133] must have heard that saying, because when life took the magic liquid out of his Magic 8 Ball, [lds133] made not eight-ball-aide, but an electronic replacement with a Raspberry Pi Pico and a round TFT display.
In case the Magic 8 Ball is unknown in some corners of the globe, it is a toy that consists of a twenty-sided die with a set of oracular messages engraved on it, enclosed in a magical blue liquid — and by magical, we mean isopropyl alcohol and dye. The traditional use is to ask a question, shake the eight-ball, and then ignore its advice and do whatever you wanted to do anyway.
[lds133]’s version replicates the original behavior exactly by using the accelerometer to detect the shaking, the round display to show an icon of the die, and a Raspberry Pi Pico to do the hard work. There’s also the obligatory lithium pouch cell for power, which is managed by one of the usual TP4056 breakout boards. One very nice detail is that instead of a distracting battery indicator, the virtual die changes color as the battery wears out.
We’ve seen digital 8 Balls before, like this one that used an STM32, or another that used a Raspberry Pi to display reaction GIFs. Some projects are just perennial.


Weird I was looking at knockoff magic 8 balls last week for a toy at work, but the options on Ali were too expensive with mediocre reviews. This is a great idea
A TSA baggage X-ray at Boston Logan airport used to have one of these sitting on top of the monitor.
I was interested in using the source code on one of my waveshare displays. But it looks to be some kind of AI generated mess that’s virtually unreadable, uncommented,, and impossible to understand. Sigh.
Now, now. Plenty of humans are capable of generating unreadable, uncommented, impossible-to-understand code.
My past self was one of them, and man, screw that guy.
+1
i’ve found that AI-generated code tends to have too many comments, not too few, unless one asks specifically for unreadable uncommented code (which is fun to do!)
For the ATmega328P based nano (run @ 3.3V) I posted the Arduino source code long, long ago. It can still be found here:
http://cdn.hackaday.io/files/2038598721903456/Magic%208%20Ball%20Source.txt
The Arduino code matches the original responses verbatim as described:
http://en.wikipedia.org/wiki/Magic_8-Ball
Note: code source us from 2014, So some changes may be required do=ue to UDE/libraries changes.
Looking over the old (very old) code, I did a quick rework to make it compatible with ArduinoIDE 1.8.13 … the ZIP includes all 3rd party dependencies: file name Magic-8ball.zip
Expand into one Sketch Folder.
http://hackaday.io/project/203859-stuff-from-my-old-lives/files
when i was a kid, i loved the LCD displays on calculators. This was partly because they resembled the text that would appear on a Magic 8 Ball. I wanted to make my own custom LCDs, but of course that was impossible. So I designed (but never fully implemented) a system for a science fair project where levers with various messages embossed on their surface would be tilted up through a murky liquid to press against a glass from below — sort of like a typewriter with words instead of letters. Somehow this failed experiment caused me to win the blue ribbon in my middle school science fair.
All hail the magic conch!
For something invented in 1946, “Outlook not so good” was remarkably prescient.