2.5. LED Display - Pixels#
The LED display consists of a 5x5 grid of Red LEDs, which are individually addressable with 256 levels of intensity.
2.5.1. Addressing Pixels#
Each pixel is individually addressable, which means that we can set their brightness individually by their location.
Set a pixel brightness#
microbit.display.set_pixel(x, y, value)
where:
xis the column numberyis the row numbervalueis the brightness between 0 and 9 inclusive
Get a pixel brightness#
value = microbit.display.set_pixel(x, y)
Which may be useful if you are not storing the pixel values yourself to save memory.