Use the Micro:bit to Chart the Brightness of a Room

Use code to detect the light levels in a room and plot the result on a bar chart.

Step 1

Create a program to measure light levels in different places in the room. You need to carry the micro:bit around to different places in the room. Show the current light level with a bar chart. Make the bar chart change when the light level changes.

Speak with a partner about what you need to do to code this app. Look through the palette. Which blocks might be the most useful?

Step 2

Test your solution on the simulator.

Download your code onto the micro:bit and test it.