Go Down

### Topic: Electronic Dice / Portable Random number generator (Read 6667 times)previous topic - next topic

#### wanderson

##### May 22, 2014, 03:46 am
When I put together the Entropy library, I started prototyping a simple electronic dice project to demonstrate the library.  I originally started with a simple array of seven led's arranged as the dots on a six sided die; however, I realized how little of the resources that used from the Arduino, and came across the 8x8 LED matrices from Adafruit and realized that these would be perfect for graphically representing a die.  As I developed the program, I decided to add other types of dice (the old D&D 4,8,10,12, and 20 sided dice).  I have been tinkering with this prototype on and off for over a year and I have added a total of ten modes to the device.

• DICE - Simulate two six sided dice

• DICE 4 - This mode simulates two dungeons and dragons style four sided dice

• DICE 8 - This mode simulates two dungeons and dragons style eight sided dice

• DICE 10 - This mode simulates two dungeons and dragons style ten sided dice.  The tenth side is displayed as a 0.  This means that this mode can be used to directly generate a random number in the range 00 - 99.

• DIE 12 - This mode simulates a single dungeons and dragons style twelve sided die.

• DIE 20 - This mode simulates a single dungeons and dragons style twenty sided die.

• CARD - In this mode the device will simulates a randomly shuffled deck of 52 standard playing cards (no joker). allowing the drawing one card from the deck with no repeats.  After all 52 cards have been draws, the deck will be reshuffled and you can start over.

• HEX - This mode randomly produces a single hexadecimal number in the range of 0x00 - 0xFF

• BIN - This mode produces sixteen random 8-bit binary random numbers displayed on the two 8x8 matrices.  Since the entropy generator used only generates 8 bytes per second, and has a queue of up to 64 bytes, this mode can empty the queue and take a second or two to display after 'rolling' the dice.

• PASSWORD - This mode slowly scrolls a eight character (0-9, a-z, A-Z. -, and +) password across the two displays.

The Arduino sketch, a circuit diagram, parts list, and a video demonstrating all ten modes are available from; https://sites.google.com/site/astudyofentropy/project-definition/timer-jitter-entropy-sources/entropy-library/led-matrix-dice

#1
##### May 23, 2014, 08:16 am

Excellent project!

I have a complaint: The images on your site are blocked.  You need to loosen the security.

And two suggestions...
1. (Optionally) Output the result to Serial.  I can imagine the device being connected to a computer to generate passwords (or maybe even dice rolls).
2. Add a coin flip option.

#### wanderson

#2
##### May 23, 2014, 03:05 pm

Excellent project!

Thanks!

I have a complaint: The images on your site are blocked.  You need to loosen the security.

Sorry, I didn't notice the problem.  It is fixed now.  Thank you!

And two suggestions...
1. (Optionally) Output the result to Serial.  I can imagine the device being connected to a computer to generate passwords (or maybe even dice rolls).

I will take care of this.  It is funny, I actually removed the code that did this since I was only using it for testing purposes!

2. Add a coin flip option.

Duh, I can't believe that this one didn't even occur to me!

#### wanderson

#3
##### May 23, 2014, 11:01 pm
Thanks to Coding Badly's suggestions I have updated the project's page as well as the video.  The sketch will now send the same information that is displayed on the Matrices to the Serial port console.  It also now has a coin flip mode.

#4
nice

#### Spacecowboy

#5
##### Jan 15, 2015, 11:48 pm
Interesting am considering building a similar device mostly  for initiative tracking in savage worlds - would also allow the use of dice simulator and full deck of cards including jokers though.

#### AndreasVan

#6
##### Feb 13, 2015, 09:13 pm
Very nice project !!!
https://github.com/AndreasVan

#### AndreasVan

#7
##### Feb 15, 2015, 09:50 am
Unfortunately the images on your site are blocked again
https://github.com/AndreasVan

#8
##### Feb 15, 2015, 08:58 pm
Unfortunately the images on your site are blocked again
Works for me.

#### AndreasVan

#9
##### Feb 15, 2015, 09:29 pm

Unfortunately not for me
https://github.com/AndreasVan

#### Nocturnus

#10
##### Feb 18, 2015, 02:15 pm
Very nice Idea.
I am currently working on something similar, not for the D&D game, but for Earthdawn instead.
Also I don't have the dot-matrix you have but bought a 20x4 LCD Module which I would use for output.

I implemented a mechanism called "exploding dice": If you roll the highest number possible on a die, you can reroll - as long as you roll again the highest number.
Additionally there are different Steps for the Skills witch translates in different dice-sets to roll. It begins with
Step 1: D4-2
to
Step 10: D10 + D6
and so on...

Go Up