MICROBIT PROJECT
LIGHT LEVEL
DESCRIPTION
Students will learn how to get the light level that can be detected by the
LED Matrix on the Microbit. Note that the light level reading will
range from zero (dark) to 255 (bright).
Note that a poorly lit room leads to a reading of zero even if it is
not complete darkness.
STEPS
STEP 1
Go to https://makecode.microbit.org/ and create a new project named LightLevel.
STEP 2
In the forever block, drag in a show
string block (Basic menu).
STEP 3
Instead of placing a string inside the circular area, drag in a light level block (Input menu).
This block will get the light level from the LED Matrix.
STEP 4
Drag in a pause block (Basic menu)
and set it to 2 seconds.
STEP 5 (TEST)
Download and run your program. Test it
in different lighting situations.
EXTRA
1. Try altering the
brightness level on the LED Matrix. Can
you get it up to 255?
|