FREE SHIPPING WITH ANY $60 ORDER. Details

Applies to US orders only. Shop Now!

littleBits "Dice"

May 12, 2014

Many games involve tossing a pair of dice.  Here is a littleBits Arduino sketch that simulates tossing a pair of dice for two players.  Of course, if there are more that two players, then the dice can be shared, as in any game with real dice.  Each player simply pushes his or her button, and the results of the toss of the pair of dice are displayed as the two digits on a number module. 

Click on the m4v movie file below to see littleBits "Dice" in action.

See the alternate image on the left for which each player has a mounting board with his/her button and number module attached.

How To Make It

STEP 1

Construct the circuit shown in the picture. Note that the Arduino module's micro-USB cable must be connected to your computer, and the computer must have the Arduino IDE software installed. The number modules should be set to "values" (not "volts"). THE ARDUINO SWITHCES SHOULD BOTH BE SET TO ANALOG. Set the dimmer switch to a random position each time before you load the sketch--this will make the odds high that you will get different dice toss results each time the Arduino with this sketch is powered up. Power up the Arduino module. Start the Arduino IDE software. Select Tools>Board>Arduino Leonardo. Then select Tools>Serial Port and select the serial port that the Arduino will use for communication. This will depend upon whether you are using a Windows, Mac, or Linux machine. Open the sketch file called Dice.ino. Upload the sketch to the Arduino module. After it is loaded you will notice that both number modules read 00. Each player can now toss his or her dice by pressing his or her button. Once you have loaded the Dice.ino program to the Arduino module, you can disconnect the circuit from your computer, and run the dice program wherever you wish!

Related Projects

#HackHallowen motion triggered scary sound device

Littlebits are like MADE for Halloween ;-). Imagine some naive and fragile kids, coming up to your house, and as they pass by a bu...

Man-Eating Plant In The Cloud

8-year-old Z's a big fan of carnivorous plants of all kinds and decided to use the Cloud Module to create his own version of Audre...

Confetti Cannon

A paper cannon that propels confetti using a fan. The confetti activates a motion sensor that sets of a light underneath the canno...