2.1.28, initiation update to PXT v5.28.24 (#54)

This commit is contained in:
Amerlander
2019-12-02 05:58:26 +01:00
committed by Peli de Halleux
parent 38a964516e
commit 5c114a0c57
1261 changed files with 50692 additions and 21604 deletions

View File

@ -6,11 +6,11 @@ Find how bright the [LED screen](/device/screen) is _when it is turned on_.
led.brightness();
```
### Returns
## Returns
* a [number](/reference/types/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.
* a [number](/types/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.
### Example: highest brightness
## Example: highest brightness
This program makes the screen completely bright when it is turned on (if it is not that way already):
@ -21,7 +21,7 @@ if (led.brightness() < 255) {
```
### Example: change brightness
## 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
@ -34,7 +34,7 @@ basic.pause(1000)
led.setBrightness(led.brightness() / 2)
```
### See also
## See also
[set brightness](/reference/led/set-brightness), [fade in](/reference/led/fade-in), [fade out](/reference/led/fade-out)