MoonCampaign by Punarvith (7 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.
Shape Changer With Light
Punarvith
Show and Tell
Show n Tell
Coming Soon
My project is called Shape Changer with Light. Using a Micro:bit, my project changes the shape displayed on the screen depending on the surrounding light level. If the light is below 100, it shows a square. If it’s 101 or higher, it shows a triangle, and if it’s over 200, it shows a right-angle triangle. I used a forever loop, variables, and if-then-else logic blocks to check light levels and update the display continuously. It’s a simple, interactive way to connect coding, electronics, and sensors!
I’m presenting my Shape Changer with Light project. It’s a Micro:bit program that changes the shape displayed on the screen depending on the light level in the room. I thought it would be fun to combine coding, sensors, and visuals to make something interactive.
Here’s how it works: if the surrounding light level is below 100, the Micro:bit shows a square. When the light level is 101 or higher, it changes to a triangle, and if the light level goes over 200, it displays a right-angle triangle. This makes it a dynamic project that reacts to real-world changes, like turning on lights or moving the Micro:bit to a brighter spot.
To make this, I used a forever loop to keep the program running continuously. I used variables to store the current light level from the Micro:bit’s light sensor. Then, I applied if-then-else blocks to set conditions for which shape to display depending on the light value. This way, the program automatically detects the light and updates the screen with the correct shape in real time.
During the demonstration, I placed the Micro:bit in different lighting conditions. When the room was dim, it showed a square. When the light was brighter, it switched to a triangle, and in very bright light, it showed a right-angle triangle.
This project is a fun and easy way to learn about sensors, logic, and coding, while making something visually interesting. It shows how coding can respond to the environment, turning a simple Micro:bit into a dynamic, interactive display.
©️ Copyright, Moonpreneur Inc.
3031 Tisch Way, 110 Plaza West PMB # 138, San Jose, CA 95128, USA
Likes
Rating
47 days left
Shape Changer With Light