48 lines
906 B
Markdown
Raw Normal View History

2016-03-25 16:47:20 -07:00
# Show LEDs
2016-06-13 14:15:39 -07:00
Shows a picture on the [LED screen](/device/screen).
2016-03-25 16:47:20 -07:00
```sig
basic.showLeds(`
. . . . .
. # . # .
. . # . .
# . . . #
. # # # .
`
)
```
### Parameters
2016-06-14 10:31:16 -04:00
* `leds` is a [string](/reference/types/string) that controls which LEDs are on and off.
2016-06-13 14:15:39 -07:00
* `interval` is an optional [number](/reference/types/number) that means how many milliseconds to wait after showing a picture.
2016-06-14 10:31:16 -04:00
If you are programming with blocks, `interval` is set at 400 milliseconds.
2016-03-25 16:47:20 -07:00
### Example
2016-03-25 16:47:20 -07:00
2016-06-13 14:15:39 -07:00
This program shows a picture with the ``show leds`` function.
2016-03-25 16:47:20 -07:00
```blocks
basic.showLeds(`
# # . # #
# # . # #
. # # # .
. # . # .
. # . # .
`
)
```
2016-06-13 14:15:39 -07:00
### ~hint
If you are programming in JavaScript, `#` means an LED that is turned
on and `.` means an LED that is turned off.
### ~
2016-03-25 16:47:20 -07:00
### See also
2016-04-15 16:15:08 -07:00
[plot leds](/reference/led/plot-leds), [show animation](/reference/basic/show-animation)
2016-03-25 16:47:20 -07:00