Skip to main content

Display

Back to article list

Display

The display is made up of 25 LEDs arranged in a 5 × 5 grid. The LEDs are connected in a matrix, and the runtime software refreshes them very quickly so that they appear to stay on without flickering. The LED matrix can also be used to detect the surrounding light level. The software briefly switches some of the LED pins to input mode and measures how long the voltage takes to drop. This time is roughly related to the amount of light around the micro.

Sample Code

Result: The micro:bit constantly checks the light level in a forever loop, displaying a heart icon if the level is less than 3 to indicate that it is dark. When you shine a flashlight on the device, the light level increases to 3 or higher, which triggers the else condition and causes the micro:bit to display a smiley face icon instead.

Specifications

Item details
Type miniature surface mount red LED
Physical structure 5x5 matrix
Electrical structure 5x5
Intensity control Software controlled up to 255 steps
Sensing ambient light estimation via software algorithm
Sensing Range TBC, 10 levels from off to full on
Colour sensitivity red centric, red is 700nm