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

@@ -14,11 +14,15 @@ has to be turned on first.
input.lightLevel();
```
### Returns
Learn more about how light level is detected in this light sensor video:
* a [Number](/reference/types/number) that means a light level from ``0`` (dark) to ``255`` (bright).
https://www.youtube.com/watch?v=TKhCr-dQMBY.
### Example: show light level
## Returns
* a [Number](/types/number) that means a light level from ``0`` (dark) to ``255`` (bright).
## Example: show light level
When you press button `B` on the microbit, this
program shows the light level
@@ -31,7 +35,7 @@ input.onButtonPressed(Button.B, () => {
})
```
### Example: chart light level
## Example: chart light level
This program shows the light level with a [bar chart](/reference/led/plot-bar-graph) on the @boardname@ screen.
If you carry the @boardname@ around to different places with different light levels,
@@ -43,7 +47,7 @@ basic.forever(() => {
})
```
### See also
## See also
[acceleration](/reference/input/acceleration), [compass-heading](/reference/input/compass-heading)