2014 Paris Motor Show highlights

DiceBot will roll a pair of dice for a tweet

By

June 23, 2014

Maker firm Intridea has created an internet-connected, Twitter-controlled dice-roller

Maker firm Intridea has created an internet-connected, Twitter-controlled dice-roller

Image Gallery (6 images)

If you're ever short a pair of dice and an online alternative won't do, you need no longer despair. Maker firm Intridea has created a real-world, internet-connected dice roller that can be operated via Twitter. DiceBot will roll the dice when prompted and then respond with a picture of your score.

DiceBot is, of course, an experiment and proof-of-concept rather than a practical solution. It forms part of Intridea's exploration of the Internet of Things, "social machines" and "human-software-hardware interaction." Such experiments, the company says, are helping it to develop a better understanding of our relationship with the increasing number of "specialized hardware devices" available to us, such as the Nest thermostat and the Fitbit Flex. DiceBot is the first of these exploratory projects that Intridea is running, company co-founder Dave Naffis tells Gizmag.

"This project in particular seemed like a lot of fun because it gave us the opportunity to take something old, a vintage dice rolling machine, and give it a new life on the internet that we could share with others," he says. "It also gave us the opportunity to tie together a number of different technologies we're quite interested in, including Rasperry Pis, Twitter API, a camera and computer vision (using OpenCV), and a real-time Single Page App (SPA) using AngularJS."

Users send a tweet to activate DiceBot, the dice are rolled and the score is sent back to ...

At its core, DiceBot is a 1920s antique dice game with some additional hardware and software. The game casing that contains the dice is mounted within a wooden frame, with a camera mounted at the top, looking down. The game casing is modified with a motor, which is controlled by a Raspberry Pi and used to spin the dice.

The Raspberry Pi is connected to the internet and a Ruby script listens for tweets directed at @IntrideaDiceBot that contain the hashtag #rollthedice. When a relevant tweet is detected, a job is placed in the system's queue.

A second Ruby script looks for jobs in the queue. When one is found, a Python script pulses the motor for half a second via some GPIO pins connected to an L298N bridge motor driver control. The dice roller is activated briefly and rattles the dice. At the same time, a tweet is automatically sent back to the user informing them that their roll is underway.

When the dice have been rolled, the camera takes a photo of the result using RaspiStill. An OpenCV image recognition program is employed to count the dots facing up on the dice. The photograph is watermarked with the user's dice score and is automatically uploaded to the DiceBot microsite.

Finally, another automatic tweet is sent to the user containing their score (so they never actually have to leave Twitter), together with a link to the website for a look at the photo.

When the motor is activated, the ridged base spins and disturbs the dice

Among the difficulties faced in producing DiceBot were camera angle and lighting. The camera was initially mounted to the side of the dice roller and, as result, the dice dots were not being picked up properly. This was resolved by moving the camera to an overhead position. The lighting issue, however, is persistent. Any fluctuation means that the system will count too few or too many dots.

"The lighting has to be strong enough to reduce shadows but at the right angle or indirect to reduce reflections," explains Naffis. "I have a couple of photography lights setup around the device at proper distances to get decent results. The detection is probably 95 percent accurate. There are still a few misreads now and then."

DiceBot was created, for the most part, over the course of a weekend, having initially been built as separate parts. The total cost was about US$130, which included the Raspberry Pi ($40), a Raspberry Pi camera ($30), a Wi-Fi dongle ($8) and a dice roller purchased on eBay ($9).

The video below shows DiceBot in action.

Source: Intridea

About the Author
Stu Robarts Stu is a tech writer based in Liverpool, UK. He has previously worked on global digital estate management at Amaze and headed up digital strategy for FACT (Foundation for Art and Creative Technology). He likes cups of tea, bacon sandwiches and RSS feeds.   All articles by Stu Robarts
2 Comments

Or you could get a pencil, put numbers on each flat face and roll it. And not only can you use it to write down the scores with, it doesn't have a battery to replace or recharge.

Mel Tisdale
24th June, 2014 @ 09:12 am PDT

I can tolerate this as a harmless technology integration exercise so long as no one actually suggests this is a potential product. The very fact that the underpinning objective is a dice rolling tool suggests strongly that the really good ideas are largely taken already. Until I read this I did not know that anyone had ever wasted enough time to make a manual dice roller!

The homeboys on my street still make do the old way by rolling dice on the pavement. Seems to work OK. This along with the over integrated key fob and the smart watch band device shown in other articles shows clearly that complexity does not render useful value in and of itself.

StWils
25th June, 2014 @ 06:54 am PDT
Post a Comment

Login with your gizmag account:

Or Login with Facebook:


Related Articles
Looking for something? Search our 28,967 articles