pxt-calliope/docs/reference/led/fade-out.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR ()
* Accessibility changes
2017-09-07 13:42:08 -07:00

764 B

Fade out

Gradually decrease the LED screen brightness until the LED lights are turned off.

led.fadeOut(700);

Parameters

  • ms - Number; the speed that the screen brightness is decreased, expressed in milliseconds (1,000 milliseconds = 1 second). The smaller the number the faster the screen brightness decreased.

Example: fade away letter A

The following example sets the screen brightness to the maximum brightness, displays the letter A, and then gradually fades the letter away:

led.setBrightness(255)
basic.showString("A", 1000)
led.fadeOut(1000)

See also

brightness, fade in, set brightness