Set Brightness

Make the LED screen as bright as you say when it is turned on.



  • value is a number that means how bright the screen is when it is turned on, from 0 (darkest) to 255 (brightest). For example, the number 127 means the screen is halfway bright when it is turned on.

The brightness is not supported in the simulator. You will need to try it on the micro:bit itself!

Example: change brightness

This program makes the screen brightness 100% (255). Then it turns on the center LED (2, 2), waits for one second, and then sets the screen brightness to 50% (128):

led.plot(2, 2)
led.setBrightness(led.brightness() / 2)

See also

brightness, fade in, fade out, LED screen