Pages: [1]   Go Down
Author Topic: Custom Risk board with Electronic Dice - NEED HELP! NEWB!  (Read 1103 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello Arduino community!

I can't tell you how exited I am to get started on my first Arduino project! Part of the project, as a whole, requires electronic dice with a digital display.

Particularly I need; A digital display (like a calculator display) that can show 3 sets of dice that go up to a 6, that can also show only 2 dice going up to 6. It is imperative that the dice results are always random as this is part of a larger 'board game' project (I cant wait to show the final project with wood working and so on). I was hoping I could get the advice, as well as the information needed to put this together on my own.

Now, what I need from the Arduino community (you guys are the coolest nerds on the block! Robots? WHAT?) is information (links, or better yet guides) to relevant information as a newbie attempting this project. A grocery list (Arduino chipset 33025BX Extreme, Digital Display 11432... ha, you know what I mean!) and anything else you think will be useful.


Edit: This is going to be used for a custom Risk board, as such, the die display needs to be able to be inlaid into a wood panel on its own. I was looking at something called 'breadboards' and it looked as though I could not feasibly inlay the display in a position I needed. Thanks guys!
Gentlemen, I'm exited to do this, but I learn by watching other people so your details and advice are what I need. Take me under your wing!
tyefire
« Last Edit: June 16, 2012, 10:21:32 pm by tyefire » Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, if you want random dice I would suggest my Entropy library which uses the jitter associated with the internal timers to produce random numbers.  It can be downloaded from the link in my signature block.  Here is an example of how to create three random dice rolls for every round through the loop.

Code:
#include <Entropy.h>

void setup()
{
  Entropy.Initialize();
}

void loop()
{
  char die1, die2, die3;
 
  die1 = Entropy.random(1,7); // returns integer value of 1 through 6 with equal probability
  die2 = Entropy.random(1,7);
  die3 = Entropy.random(1,7);
  // Do something to display dice results...
}
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Alright, that's part of the puzzle! Any other gurus out there?

smiley Ha! I just realized I typed 'exited' instead of excited on the first post... "I have exited to do this guys, make sense do I"!
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 197
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How large of a display are you looking at? for medium sized I would suggest making an LED display yourself on perfboard
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The display would have to be roughly an inch and a half tall or smaller, and I'm looking at either 3 consecutive displays showing each dice roll, or one big display showing the 3 dice rolls. Then alternatively, I would need the option of rolling just 2 die on the board.

It is for a custom Risk board I want to build, to modernize it I want to have electronic dice onboard.
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, you will want to start by breadboarding your device, until you get everything tested and working.  Only then should you build the prototype in a way that you could mount it to your risk board.  For three digit display, you will probably want to use a seven segment display.  These come in various sizes and colors, so you shouldn't have too much trouble finding what you need.

I haven't used any of these but a perusal of the Arduino playground turned up a few links that may help you:

http://code.google.com/p/mutiplex7seg/
https://github.com/csdexter/MAX7219
https://www.google.com/search?source=ig&hl=en&rlz=1G1GGLQ_ENUS395&q=arduino+seven+segment&oq=arduino+seven+&aq=0&aqi=g6&aql=&gs_l=igoogle.1.0.0l6.545.3803.0.7296.14.12.0.2.2.0.149.1187.9j3.12.0...0.0.ar6x_TkIsH4

Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Offline Offline
Newbie
*
Karma: 0
Posts: 5
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Now I've found a set of tutorials that will enable to me to make "Arduino Dice" with a 7 segment display on startingelectronics.com

What do I need to do to operate 3 and 2 7-segment displays concurrently using the same process? What would a plan for that look like?

Specifically, would it be the coding that would need to be different (from a single 7 segment display) or the wiring or both? Would I have to make 3 separate dice with separate Arduino Uno Boards? And does a usb cable need to be plugged into an arduino board for something like this to work as it is working?
Logged

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 474
Posts: 18696
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And does a usb cable need to be plugged into an arduino board for something like this to work as it is working?

No, that is for programming or getting serial data to/from the device. Otherwise you can run it from the power jack.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1833
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

You know for a risk board, rather than display the dice as numbers, I would think a better display would be to have 7 LEDS per dice (or 14 leds).  Of course with that setup, you wouldn't want to control each led with a separate pin, unless you had a Mega.  Even with a Mega, you might want to have some way of encoding the leds to set with a few pins.  I believe the Matrix example in the learning section deals with this.  With LEDS and such, you can always just drill a hole in the wood just big enough for the LED, and keep the wires below it.

An alternative, might be a low res graphic screen, particularly with a touch sensor, so that you could indicate which dice to re-roll.

Of course by listening to me, I probably just made your project even harder.  smiley-twist smiley smiley-cool smiley-roll
Logged

Dallas, Texas
Offline Offline
God Member
*****
Karma: 30
Posts: 887
Old, decrepit curmugeon
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I have produced a new example for my Entropy library that performs precisely this function.  The code was designed to be easy to understand, rather than fast, so it is a little unrefined, but should give a good starting point for your risk board.  It currently has two multiplexed six-sided dice represented as seven led's for each die.  More dice can easily be added.  The example, along with schematic and statistical analysis of the code's performance is available from http://code.google.com/p/avr-hardware-random-number-generation/source/browse/#git%2FEntropy%2Fexamples%2FDice and I made a short video of my wire wrapped prototype to show how it functions, available from http://code.google.com/p/avr-hardware-random-number-generation/downloads/detail?name=2012-06-25_11-29-15_780.3gp&can=2&q=#makechanges

Before publishing, I ran a test of about 12,000 throws of the dice (used another arduino to 'push' the roll button and record the results.  Like all of the other tests (http://arduino.cc/forum/index.php/topic,108380.30.html) run so far, the performance is very good.

Hope this helps!
Logged

New true random number library available at: http://code.google.com/p/avr-hardware-random-number-generation/

Current version 1.0.1

Offline Offline
Sr. Member
****
Karma: 0
Posts: 322
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im only a newb so im afraid i cant be of much use,

but i wholly approve of electronic dice for risk, i will interested to see the result,

also , if you dont go with the 7 led option (which would be really cool)
you could maybe hook up a parrallel lcd display, they are easy to work with, you could get a four line one,
and with a little coding you could use the two bottom lines to announce how many troops each player loses,

imagine

attacker 6 5 5

defender 5 5

attacker loses 1

defender loses 1

that would stop a lot of sneaky cheating in the game, hahahaha
Logged

Pages: [1]   Go Up
Jump to: