MoonCampaign by Vedith (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.
Magic 8 Ball
Vedith Gowri
Show n Tell
Show n Tell
Coming Soon
The Magic 8 Ball project is a digital version of the classic fortune-telling toy, designed using a Micro:bit. It combines randomness and gesture detection to provide answers to the user’s questions. This project uses a simple yet effective code structure to deliver a fun and engaging experience. The core of the code lies in two important commands. The first is random.randint, which generates a random number between 1 and 8. This command ensures that the responses provided by the magic 8 ball are unpredictable and diverse. The second key command is if accelerometer.was_gesture('shake'), which detects when the Micro:bit is shaken. This gesture triggers the random number generation, making the experience interactive and tactile. When you shake the Micro:bit, it generates a random number corresponding to one of eight pre-programmed answers, which are displayed on the screen. Each number aligns with a classic Magic 8 Ball response, such as “Yes,” “No,” or “Ask Again Later.” The combination of randomness and gesture-based activation creates a dynamic user experience that mimics the real Magic 8 Ball in a digital format. This project showcases the power of simple coding commands to create interactive and fun applications. By leveraging the accelerometer and randomness, the Magic 8 Ball delivers a delightful and nostalgic experience, blending technology and creativity seamlessly.
©️ Copyright, Moonpreneur Inc.
3031 Tisch Way, 110 Plaza West PMB # 138, San Jose, CA 95128, USA
Likes
Rating
62 days left
Magic 8 Ball