Hello all
Having some trouble coming up with a clear path to my current project, which is a set of digital dice.
First I will give a quick overview of my project, then I will get to the problem I am having.
I am trying to build these dice with multiple modes. They are based on a full set of D&D dice, so the dice values I want to use are 2, 4, 6, 8, 10, 12, and 20. I am using a push button to switch dice modes, then a tilt switch to "roll" the dice.
I have already made this work fairly easily with a single 7 segment display, using the dot segment to indicate a double digit number. Now I am trying to use two 7 segment displays to show the results.
I am trying to do this without using any off-arduino ICs. I am using two common cathode 7 seg displays. I have the segments tied together and a couple of 2n2222a transistors on the common cathodes to handle the switching, giving a multiplex effect.
I would post my code, but nothing I have wrote has even come close to working. I have tried modifying some examples I have found to suit my project, but haven't had any luck there either. All of the samples I can find either use external ICs or they scroll a prepackaged message, rather than simply displaying the result of a random function.
I know how to get the random function to work, and how to tell the arduino where to set the result limits based on which dice mode you are in.
What I do not know is how to take that result, break it down into two separate digits, and display one number on each 7 seg.
If anyone has any suggestions, or can point me to some sample code that could be modified to get this working, I would greatly appreciate it!
Thanks in advance for any suggestions
N8