798 B
798 B
Set Brightness
Sets the brightness of the LED screen.
led.setBrightness(121)
Parameters
- value : Number - the brightness of the LED screen expressed as a number between 0 and 255
Example: change brightness
The following example sets the screen brightness to 100% (255), turns on LED 2, 2
, waits for a second and then sets the screen brightness to 50% (127):
led.setBrightness(255)
led.plot(2, 2)
basic.pause(1000)
led.setBrightness(127)