Set Brightness

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

led.setBrightness(121)

Parameters

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.setBrightness(255)
led.plot(2, 2)
basic.pause(1000)
led.setBrightness(led.brightness() / 2)

See also

brightness, fade in, fade out, LED screen

Edit this page on GitHub