pxt-calliope/docs/reference/basic/clear-screen.md

32 lines
762 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# Clear Screen
Turn off all the LED lights on the [LED screen](/microbit/device/screen).
```sig
basic.clearScreen()
```
### Example: vanishing heart
The following code displays a heart on the screen and then turns off all the LED lights using `clear screen`:
```blocks
basic.showLeds(`
. # . # .
# # # # #
# # # # #
. # # # .
. . # . .
`)
basic.clearScreen()
```
### Lessons
[blink](/microbit/lessons/blink), [flashing heart](/microbit/lessons/flashing-heart), [screen wipe](/microbit/lessons/screen-wipe)
### See also
[set brightness](/microbit/reference/led/set-brightness), [unplot](/microbit/reference/led/unplot), [plot](/microbit/reference/led/plot), [Image](/microbit/reference/image/image), [clear](/microbit/reference/basic/clear-screen)