DiceBot: The Twitter-Controlled Dice Roller
It started with a 1920s antique dice tin I bought on eBay. The thing was beautiful - a small metal container with a button on the side that, when pressed, would spin the bottom and tumble a pair of dice inside. There was something satisfying about the mechanical simplicity of it, the way it required a physical interaction to produce a random result.

But I couldn’t help wondering: what if you didn’t have to be there to push the button? What if this vintage piece of hardware could be controlled from anywhere in the world? That question led to DiceBot, an internet-connected dice roller that responds to Twitter commands.
Bringing Vintage Hardware Online
The original tin worked perfectly as-is. Push the button, spin the dice, check the result. But the button was the problem - you had to be physically present. So I added a small motor connected to a Raspberry Pi, which meant I could control the spinning mechanism programmatically. The L298N motor driver handled the power management, and GPIO pins on the Pi gave me the control I needed.

The hardware side was straightforward enough, but the real challenge was making it useful. I wanted people to be able to roll the dice remotely, and Twitter seemed like the perfect interface. Everyone already knew how to tweet, and the API made it easy to listen for commands. So I built a Ruby script that would watch for tweets mentioning @IntrideaDiceBot with the hashtag #RollTheDice, then queue up the requests.
The Magic of Computer Vision
Once the dice were rolling, I needed a way to actually read them. That’s where OpenCV came in. I mounted a Raspberry Pi camera above the dice tin, and after each roll, it would capture an image. The computer vision code would analyze the pips on the dice and count them up. It wasn’t perfect - sometimes the lighting or angle would confuse it - but it worked well enough to be reliable.
The whole process feels magical every time it works. Someone tweets from halfway around the world, the motor spins, the camera captures, OpenCV counts, and a few seconds later that person gets a tweet back with their result and a photo of the actual roll. It’s a physical random number generator accessible to anyone with a Twitter account.
Building the Dashboard
I wanted people to be able to see all the rolls happening in real-time, so I built a web dashboard using Firebase and AngularJS. The dashboard shows a live feed of every roll, complete with photos and timestamps. It’s become a kind of digital window into this physical device sitting in our office.
The dashboard also solves a practical problem: when multiple people want to roll at the same time, we need a queue system. The Ruby scripts handle job queuing, processing requests one at a time so the dice have time to settle between rolls. It’s not the most sophisticated queuing system, but it works.
What Made It Special
You have this antique piece of hardware from nearly a century ago, combined with modern maker tools like the Raspberry Pi, controlled through social media, and powered by computer vision. It’s playful and accessible, but it also demonstrates real technical concepts.
The project has been getting picked up by publications, which is exciting. Hackaday featured it as an innovative maker project. CNET wrote about it from a mainstream tech perspective. Adafruit showcased it as a Raspberry Pi project. New Atlas covered it as an innovation feature. Each publication sees something different in it - some focus on the maker aspect, others on the IoT angle, some on the social media integration.
DiceBot represents something bigger than just a fun project. People are starting to talk about the Internet of Things, but most examples are either too complex or too theoretical. DiceBot shows that you can connect physical objects to the internet using accessible tools, and you can make it playful and engaging.
It also demonstrates what I’m calling “social machines” - devices that are controlled through social media platforms. The idea that you can tweet at a physical object and have it respond feels like we’re exploring new territory. It’s not something you see every day.
The project proves that IoT projects don’t need to be complex or expensive. You can take something simple, a dice roller, add some common maker components, write some straightforward code, and create something that people actually want to interact with.
What’s Next
DiceBot was never meant to be a commercial product. It’s an exploration, a proof of concept, a way to play with ideas about how physical objects and digital interfaces can intersect. But it’s teaching me valuable lessons about making technology accessible and engaging.
DiceBot combines several trends that are defining this moment: IoT, social machines, the maker movement, and the idea that technology can be playful rather than just functional. It’s a small project, but it captures something about where we are right now, a time when connecting things to the internet is becoming easier, and people are starting to imagine what that could mean.