2016-06-18 00:00:24 +02:00
|
|
|
# Create Big Image
|
|
|
|
|
2016-11-02 01:44:37 +01:00
|
|
|
Make a big [image](/reference/images/image) (picture) for the @boardname@
|
2016-06-18 00:00:24 +02:00
|
|
|
[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.
|
|
|
|
|
2016-07-19 00:18:40 +02:00
|
|
|
```sig
|
2016-06-18 00:00:24 +02:00
|
|
|
images.createBigImage(`
|
|
|
|
. . # . . . . # . .
|
|
|
|
. # # # . . . # . .
|
|
|
|
# . # . # # . # . #
|
|
|
|
. . # . . . # # # .
|
|
|
|
. . # . . . . # . .
|
|
|
|
`);
|
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Parameters
|
2016-07-19 00:18:40 +02:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
* ``leds`` is a [string](/types/string) that says which LEDs
|
2016-07-19 00:18:40 +02:00
|
|
|
on the screen should be on and which should be off.
|
|
|
|
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## Example: Flip-flopping arrow
|
2016-06-18 00:00:24 +02:00
|
|
|
|
|
|
|
This program makes a big image with a picture of an arrow pointing up,
|
|
|
|
and an arrow pointing down. If you press button `A`, the program will
|
|
|
|
show the arrow pointing up, which starts `0` LEDs from the left in the
|
|
|
|
big image. If you press button `B`, the program will show the arrow
|
|
|
|
pointing down, which starts `5` LEDs from the left.
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
let arrows = images.createBigImage(`
|
|
|
|
. . # . . . . # . .
|
|
|
|
. # # # . . . # . .
|
|
|
|
# . # . # # . # . #
|
|
|
|
. . # . . . # # # .
|
|
|
|
. . # . . . . # . .
|
|
|
|
`);
|
2022-04-26 19:28:42 +02:00
|
|
|
input.onButtonEvent(Button.A, ButtonEvent.Click, () => {
|
2016-06-18 00:00:24 +02:00
|
|
|
arrows.showImage(0);
|
|
|
|
});
|
2022-04-26 19:28:42 +02:00
|
|
|
input.onButtonEvent(Button.B, ButtonEvent.Click, () => {
|
2016-06-18 00:00:24 +02:00
|
|
|
arrows.showImage(5);
|
|
|
|
});
|
|
|
|
```
|
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
## See also
|
2016-06-18 00:00:24 +02:00
|
|
|
|
2019-12-02 05:58:26 +01:00
|
|
|
[image](/reference/images/image),
|
2016-06-18 00:00:24 +02:00
|
|
|
[create image](/reference/images/create-image),
|
2016-06-18 01:20:17 +02:00
|
|
|
[show image](/reference/images/show-image),
|
|
|
|
[scroll image](/reference/images/scroll-image), [show animation](/reference/basic/show-animation)
|