1.0 KiB
1.0 KiB
Show LEDs
Display an image on the BBC micro:bit's LED screen.
basic.showLeds(`
. . . . .
. # . # .
. . # . .
# . . . #
. # # # .
`
)
Parameters
ledsis a String that shows which LEDs are on and off.msis an optional Number that shows how many milliseconds to wait after showing a picture. If you are programming with blocks,msstarts out as 400 milliseconds.
Example
Open the basic card in the Block Editor and select the show leds blocks.
basic.showLeds(`
# # . # #
# # . # #
. # # # .
. # . # .
. # . # .
`
)
If you are programming in JavaScript, # means an LED that is turned on and . means an LED that is turned off.
Lessons
smiley, flashing heart, magic logo