microbit.display.panAsync
Appearance
Pan an image across the LED matrix. This is a non-blocking function, returning immediately.
Function
Synopsis
microbit.display.panAsync(image)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
Returns
A boolean value. True on success.
Example
microbit.display.panAsync {
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.panAsync(image, delay)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `delay` — Delay between animation frames in milliseconds, a number.
Returns
A boolean value. True on success.
Synopsis
microbit.display.panAsync(image, delay, stride)
Arguments
- `image` — An image table with `width`, `height` and `data` fields.
- `delay` — Delay between animation frames in milliseconds, a number.
- `stride` — The number of pixels by which the image moves to the right each frame.
Returns
A boolean value. True on success.