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

@@ -2,47 +2,47 @@
Show a number on the [LED screen](/device/screen). It will slide left if it has more than one digit.
~~~~sig
basic.showNumber(2, 150)
~~~~
```sig
basic.showNumber(2)
```
### Parameters
## Parameters
* `value` is a [Number](/reference/types/number).
* `interval` is an optional [Number](/reference/types/number). It means the number of milliseconds before sliding the `value` left by one LED each time. Bigger intervals make the sliding slower.
* `value` is a [Number](/types/number).
* `interval` is an optional [Number](/types/number). It means the number of milliseconds before sliding the `value` left by one LED each time. Bigger intervals make the sliding slower.
### Examples:
## Examples:
To show the number 10:
~~~~blocks
```blocks
basic.showNumber(10)
~~~~
```
To show the number stored in a variable:
~~~~blocks
```blocks
let x = 1
basic.showNumber(x)
~~~~
```
### Example: count to 5
## Example: count to 5
This example uses a [for](/blocks/loops/for) loop to show numbers ``0`` through ``5`` on the screen:
~~~~blocks
```blocks
for (let i = 0; i < 6; i++) {
basic.showNumber(i)
basic.pause(200)
}
~~~~
```
### Other show functions
## Other show functions
* Use [show string](/reference/basic/show-string) to show a [String](/reference/types/string) with letters on the screen.
* Use [show string](/reference/basic/show-string) to show a [String](/types/string) with letters on the screen.
* Use [show animation](/reference/basic/show-animation) to show a group of pictures on the screen, one after another.
### See also
## See also
[show string](/reference/basic/show-string), [show animation](/reference/basic/show-animation), [Number](/reference/types/number), [math](/blocks/math)
[show string](/reference/basic/show-string), [show animation](/reference/basic/show-animation), [Number](/types/number), [math](/blocks/math)