By now most of us are familiar with the Arduino platform. It’s an inexpensive and fairly easy way into the world of microcontrollers. For plenty of projects, there’s no need to go beyond that unless you have a desire to learn more of the inner workings of microcontrollers in general. [Cristiano] was interested in expanding some of his knowledge, so he decided to build this electronic dice using a PIC microcontroller instead of the Arduino platform he was more familiar with.
As a result, this project is set up as a how-to for others looking to dive further into the world of microcontrollers that don’t have the same hand-holding setup as the Arduino. To take care of the need for a random number for the dice, the PIC’s random number generator is used but with the added randomness of a seed from an internal timer. The timer is started when a mercury tilt switch signals the device that it has been rolled over, and after some computation a single digit number is displayed on a seven-segment display.
While it might seem simple on the surface, the project comes with an in-depth guide on programming the PIC family of microcontrollers, and has a polish not normally seen on beginner projects, including the use of the mercury tilt switch which gives it a retro vibe. For some other tips on how to build projects like this, take a look at this guide on how to build power supplies for your projects as well.