Digital dice

Digital dice solves a silly problem where I keep throwing dice off the table, ok ok it solves no problem and I just wanted to play with a Pico Pi and write some MicroPython :D Besides the sillyness, I really wanted to have digital dice. I thought it would be a cool project that I could actually use when playing Catan.

Conceptual Thinking

There are a few options I looked at, I included the research if applicable so I dont have to go snorkel in the future if I decide to tinker.

I2C 16x2 LCD Display

Pico Pi with I2C 16x2 LCD Display Module (PCF8574)

2 Digit Alphanumeric LED Display

Pico Pi with 2 Digit Alphanumeric LED Display:

  • This screen is really cool but the cheap ones I can find with a simple pinout (ie: CLK, DIO, GND, 5V) and chip like a TM1637 are all 4 digit displays so I thought that would look funny
  • Cool example from a larger 8 digit display

Arduino with any screen

NE555 Chip

Pico Pi with LEDs

Pico Pi with LEDs

With Pico Pi with LEDs as the best path I did some conceptual whiteboarding to think about the physical layout, how many pins I needed to use ect. The NE555 chip kit also gave me a better idea on the layout.

conceptualize pins to leds

I then made up some test LED with inline resisters, there is a bit math to figure out what resister to use. I physically soldered one to the board to test.

leds with resisters

I then used a Pi4 Raspberry Pi OS and Thonny IDE adapting their examples to test blinking the LED. After that worked I soldered and made up the rest.

digital dice leds connected

I then completed the code and tested that worked, the complete code is here https://github.com/carlpaton/PicoPiHoon/blob/main/Pi%20Pico/Dice/main.py

I then added a button, updated the code and printed a quick box (the design is prototype so I didnt upload the STL)

digital dice prototype

I powered it with 4 old AAA batteries connected in series, I need to draw up a better box, future Carls problem :D