MoonCampaign by Ethan (10 years)
Our Social Impact - We're transforming education globally with free robotics and math workshops in the US, UK,
Canada, and Australia.
Our workshops have helped 66,000 students alone in the US plus 14,000 students benefit from our four-week sessions.
A Digital Dice
Ethan
Show and Tell
Show n Tell
Coming Soon
Ethan's Dice Program turns a Micro:bit into a fun, interactive digital dice. By simply shaking the Micro:bit, the accelerometer detects the motion and displays a SILLY face, followed by a random number between 1 and 6, just like a real dice roll. After a short pause, a FABULOUS face appears, adding a playful twist. Future improvements could include dice roll animations, sound effects, or even a multiplayer version using radio communication between Micro:bits.
Have you ever wanted to roll a dice without actually having one? I created a fun Dice Program using the Micro:bit that does just that! With a simple shake of the Micro:bit, you get a random number between 1 and 6, just like rolling a real dice. It’s a great way to explore how randomness and user interaction can be combined in coding.
Here’s how it works: the Micro:bit uses its built-in accelerometer to detect the shake gesture. Once shaken, it first displays a SILLY face image for a fun touch, then shows a random number from 1 to 6, simulating the dice roll. After a short pause, a FABULOUS face pops up, making the entire experience playful and engaging.
Looking ahead, I could expand this project by adding animations for each dice number or even sound effects to make it more immersive. Another idea is to create a multiplayer dice game using radio communication between Micro:bits. The possibilities are endless when you mix creativity with coding!
©️ Copyright, Moonpreneur Inc.
3031 Tisch Way, 110 Plaza West PMB # 138, San Jose, CA 95128, USA
Likes
Rating
14 days left
A Digital Dice