Find how bright the LED screen is when it is turned on.
led.brightness();
0
(darkest) to 255
(brightest). For example, the number 127
means the screen is halfway bright when it is turned on.This program makes the screen completely bright when it is turned on (if it is not that way already):
if (led.brightness() < 255) {
led.setBrightness(255)
}
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)