In January I complained on HackADay about an electronic dice. It was overkill on the hardware, and said I could do better. And I just did, the 7segment displays I had back then where broken. But I salvaged new ones last week.
Hardware wise it’s an ATTiny2313, 4x 7segment displays, 4 resistors and an USB cable for power. And a single button. All packed into a very tight space, with a lot of wires.
Software wise it runs on the ATTiny2313, which has 2K of flash. I’m using 1.3K of it, in which I have a configurable number of dice, configurable dice type. Long presses on the button switch between configuration and throw dice, while a single press throws the dice or increases the number/changes type.
The old 4x 7segment display was just 1 thing, with 12 connections (8x anode, 4x cathode) and I was planning to put the ATTiny2313 behind it. The new 7 segment displays are single 7segment displays, and so I had to connect all the anodes together myself.
The button is connected to the ground on one side, and other other side is connected to an input pin configured with pull-up.
I used 270Ohm resistors, and I shouldn’t have, the display isn’t that bright. But I had those resistors laying around. I’ll think I’ll update those when I change the power for this thing. The USB connection is only to test it. I want to run the power from a single AA battery, which I found some tricks online to make it work.
Pictures!
My soldering hell. It works!
A dice roll total of 33.
Configured as 2d6



