Strawbees Logo
Create a Light Sensing Plant with BBC micro:bit

Create an animated potted plant responding to light.

arrow left
arrow right

The biodiversity of the plant kingdom is vast and impressive. There are flowers that open during the dusk then close by morning, trees spanning more than 80m tall, and cacti that can live a few years without water.

Plants are phototropic where they bend and grow in the direction the source of light present. Plants also can use negative phototropism, like roots, where the preference is the absence of light and it will retract.

In this activity, you are building a potted plant model using the 5×5 LED matrix of the micro:bit for light-sensing and controlling the servo motor’s movement. The leaves are built as a lever design pushed and pulled by the servo motor measuring the amount of light present to look.

Use the MakeCode editor to program the Robotic Inventions for micro:bit. 

arrow left
arrow right


Use the light sensor as a playful interaction with your plant to create different behaviors like covering the LED matrix to show catching prey or fold the leaves up when lightly touched. Explore even more ways to vary your Strawbees construction!