microbit.display.showAsync
Appearance
Display an image on the LED matrix. This is a non-blocking function, returning immediately.
Function
Synopsis
microbit.display.showAsync(image)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
Returns
A boolean value. True on success.
Example
microbit.display.showAsync {
width = 5,
height = 5,
data = string.char(
0, 255, 0, 255, 0,
255, 64, 255, 64, 255,
255, 64, 64, 64, 255,
0, 255, 64, 255, 0,
0, 0, 255, 0, 0
)
}
Synopsis
microbit.display.showAsync(image, x)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `x` — Horizontal displacement, a number.
Returns
A boolean value. True on success.
Synopsis
microbit.display.showAsync(image, x, y)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `x` — Horizontal displacement, a number.
- `y` — Vertical displacement, a number.
Returns
A boolean value. True on success.
Synopsis
microbit.display.showAsync(image, x, y, alpha)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `x` — Horizontal displacement, a number.
- `y` — Vertical displacement, a number.
- `alpha` — Transparency of zero-valued pixels, a number.
Returns
A boolean value. True on success.
Synopsis
microbit.display.showAsync(image, x, y, alpha, delay)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `x` — Horizontal displacement, a number.
- `y` — Vertical displacement, a number.
- `alpha` — Transparency of zero-valued pixels, a number.
- `delay` — Waiting time in milliseconds, a number.
Returns
A boolean value. True on success.