A re-creation of a e-Dice found in a children’s book
Some years ago, I went to a book exhibition where they literally sold imported books by the kilo. I am not speaking metaphorically. They sold books by weight. One of the books I bought was a children’s book. It had a circle-shaped plastic electronic toy stuck to the cover. It was an electronic dice. It cut through all pages and you could play a different board game on each of the pages in the book using the dice.
The dice construction was simple. Several LEDs were placed in a circle. When you pressed the center button, the LEDs lit up one after another along the circle. The dice also had a clear-plastic membrane speaker. The whole thing was powered using button-cell batteries. I saved the speaker and threw the dice away after the batteries ran out.
Silly me! I was then only interested in speaker circuits. Now that I am learning to play with Uno, I decided to re-create the dice. I have a ATtiny85 chip with which I will make this a self-contained toy. The ATtiny85 has 6 pins to connect the LEDs (I will hack the reset pin) and that leaves nothing for the speaker. I gave it a direct connection to power.
The circuit is simple. Connect the positive leads of the LEDs to the digital out pins marked for analog use (~). Connect the negative leads to a 220-ohm resistor. Connect the other end of the resistor to the ground pin on the Arduino. Connect the speaker parallel to the resistor. Add a 1uF capacitor to speaker terminals if the sound is weak.
Almost all dice circuits online are dumb. Not this one. It has sound and will be fun for kids to play with. I will order a circle-shaped sticker with numbers so that the dice is fully functional like the original toy.