MoonCampaign by Rohan (13 years)
Digital Dice
Rohan
Show and Tell
Show n Tell
Coming Soon
I created a Futuristic Color Dice using the Micro:bit. This project simulates a digital dice where shaking the Micro:bit generates a random number from one to six. Each number is displayed on the Micro:bit LED screen and also represented by a unique RGB color using an external LED. The code uses variables, random number generation, and pauses to control the display. This digital dice is perfect for board games since it prevents cheating.
I am presenting my project called Futuristic Color Dice. I made this project using a Micro:bit and an RGB LED to create a fun and colorful digital dice for board games.
The dice works by generating a random number between one and six whenever you shake the Micro:bit. Each number is displayed on the LED screen of the Micro:bit, while the RGB LED shows a unique color for that number. For example, if the dice rolls three, the Micro:bit shows the number 3, and the LED displays a specific color assigned to three. This combination of visual number and color makes the dice more engaging and futuristic.
In my code, I set a variable called value to zero and used a function to define the LED color for each roll. I included a pause of 100 milliseconds so the display updates smoothly. I wanted to add a buzzer that would play a sound whenever the dice rolled, but it didn’t work in time for this project. Despite that, the dice still works perfectly. This project is useful for playing games without worrying about cheating, since it’s digital and random. It also demonstrates how to use Micro:bit outputs, RGB LEDs, loops, and conditional logic to simulate a physical object in a digital format.
Overall, the Futuristic Color Dice combines coding, electronics, and fun gameplay. It was exciting to see the random numbers and colors appear with every shake, and it taught me a lot about digital outputs and microcontroller programming.
©️ Copyright, Moonpreneur Inc.
3031 Tisch Way, 110 Plaza West PMB # 138, San Jose, CA 95128, USA
Likes
Rating
47 days left
Digital Dice