Fixing parameters
This commit is contained in:
Родитель
2c09b7794f
Коммит
ad6ef04b1f
|
@ -4,7 +4,7 @@ Make a big [image](/reference/images/image) (picture) for the micro:bit
|
|||
[LED screen](/device/screen). The big image made of two squares.
|
||||
Each of the squares is five LEDs on a side, like a regular image.
|
||||
|
||||
```blocks
|
||||
```sig
|
||||
images.createBigImage(`
|
||||
. . # . . . . # . .
|
||||
. # # # . . . # . .
|
||||
|
@ -14,6 +14,12 @@ images.createBigImage(`
|
|||
`);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* ``leds`` is a [string](/reference/types/string) that says which LEDs
|
||||
on the screen should be on and which should be off.
|
||||
|
||||
|
||||
### Example: Flip-flopping arrow
|
||||
|
||||
This program makes a big image with a picture of an arrow pointing up,
|
||||
|
|
|
@ -13,6 +13,11 @@ images.createImage(`
|
|||
`)
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* ``leds`` is a [string](/reference/types/string) that says which LEDs
|
||||
on the screen should be on and which should be off.
|
||||
|
||||
### Example: Flip-flopping arrow
|
||||
|
||||
If you press button `A`, this program will make a picture of an
|
||||
|
|
|
@ -3,9 +3,14 @@
|
|||
Scroll (slide) an [image](/reference/images/image) (picture) from one
|
||||
side to the other of the [LED screen](/device/screen).
|
||||
|
||||
```sig
|
||||
let item: Image = null;
|
||||
item.scrollImage(5, 200);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* ``offset`` is a [number](/reference/types/number) that means
|
||||
* a [number](/reference/types/number) that means
|
||||
how many LEDs to scroll at a time, from right to left or
|
||||
left to right. If you use a positive number like `2`, the image
|
||||
will scroll from the right side of the screen to the left.
|
||||
|
@ -15,7 +20,7 @@ side to the other of the [LED screen](/device/screen).
|
|||
image. It is a square with five LEDs on a side). This is
|
||||
useful for **animation**.
|
||||
|
||||
* ``interval (ms)`` is a [number](/reference/types/number) that means
|
||||
* a [number](/reference/types/number) that means
|
||||
how many milliseconds to wait before scrolling the amount that
|
||||
``offset`` says. (1000 milliseconds is one second.) The bigger you
|
||||
make this number, the slower the image will scroll.
|
||||
|
|
|
@ -4,6 +4,11 @@ Show an [image](/reference/images/image) (picture) on the
|
|||
[LED screen](/device/screen). After the micro:bit shows an image, it
|
||||
will pause for 400 milliseconds (1000 milliseconds is one second).
|
||||
|
||||
```sig
|
||||
let item: Image = null;
|
||||
item.showImage(0);
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
* an [image](/reference/images/image) (picture). It is usually a square with five LEDs on a side, but it might be wider.
|
||||
|
|
Загрузка…
Ссылка в новой задаче