[David] modernized a 1920’s dice rolling game to bring us DiceBot, a twitter enabled dice rolling robot. DiceBot started with an antique dice tin. The original tin was human controlled. Pushing a button on the side of the tin would spin the bottom, rolling the dice.
It’s a bit hard to push a button from across the world, so [David] added a small motor to spin the tin. He connected the motor to a simple L298 motor driver chip, and wired that up to a Raspberry Pi. The Pi runs a few custom Ruby scripts which get it on the internet and connect to the Twitter API.
Operation is pretty straightforward. A tweet to @IntrideaDiceBot with the hashtag #RollTheDice will cause the Dicebot to spin up the dice. Once things have settled, DiceBot captures an image with its Raspberry Pi camera. The dice values are checked using OpenCV. The results are then tweeted back, and displayed on DiceBot’s results page.
For more DiceBot, check out [David’s] flickr stream.
haha cool.
It’d be kinda cool if you could watch it spin the dice live, but I imagine that wouldn’t be very data-usage friendly.
Nice hack, but can it be truly random? The last rolls are a given and the spin time is very short. I guess it just needs to spin longer to be random.
I don’t think two dice are suitable for proper randomization as you have a far better chance of rolling a 7 than you have rolling a 2.
http://up.picr.de/18690794lu.jpg
I did this once, and it was wrong!