Ball Bouncing Animation

MoonCampaign by Ved (13 years)

At Moonpreneur, we empower students to turn ideas into reality through hands-on project & product building.
Our MoonCampaigns highlight their creativity, public speaking, presentation skills, and teamwork.

Quarterly MoonCampaigns: Four Innovation and Leadership Showcases Annually by
Every Student—Thousands of Inspiring Learning Stories Unveiled.

Likes

Rating

42 days left

Your support will go a long way in encouraging Ved and taking their innovation Ball Bouncing Animation to new heights.
Ball Bouncing Animation
terms and conditions
:

Ball Bouncing Animation

:

Ved

:

Show and Tell

:

Show n Tell

:

Coming Soon

About the Innovator

Ved’s Ball Bouncing Animation on the Micro:bit is a creative and visually engaging project. Using Python, Ved programmed the Micro:bit to simulate a ball bouncing around the LED screen. The animation uses loops and conditional statements to move the ball across the display, changing direction when it reaches the edges. This project is a fun way to explore animation and coding on the Micro:bit , showcasing how simple code can create dynamic visuals.

Want your child to be part of an innovative and creative competition?

STORY

Total Views:

Animation has always fascinated me, and I wanted to bring that excitement to the Micro:bit. My Ball Bouncing Animation project simulates a ball moving around the LED screen, bouncing off the edges as if it’s in a tiny box. Using Python, I programmed the Micro:bit to display a single LED as the ball and move it across the screen using loops and conditional statements. When the ball reaches the edge of the display, it changes direction, creating the illusion of bouncing. It’s a simple yet captivating way to explore animation and coding.


The code works by defining the ball’s position using variables for its x and y coordinates. A loop continuously updates the ball’s position, moving it one step at a time. Conditional statements check if the ball has reached the edges of the screen, and if so, the direction is reversed. The display.set_pixel function is used to turn on the LED at the ball’s current position, while the previous position is turned off to create the illusion of movement. It’s amazing how a few lines of code can create such a dynamic and engaging animation.


In the future, I’d like to expand this project by adding more features, such as multiple balls bouncing simultaneously or changing the ball’s speed based on user input. I’m also thinking about adding sound effects or creating a game where the player interacts with the bouncing ball. The possibilities are endless, and I’m excited to see how this project can evolve!

Every child is gifted. Discover how yours can innovate and lead

Comments

You Might Also Like

Every child is gifted. Discover how yours can innovate and lead