pxt-calliope/docs/reference/basic/show-icon.md

26 lines
529 B
Markdown
Raw Normal View History

2017-02-27 18:07:36 +01:00
# Show Icon
Shows the selected icon on the LED screen
```sig
basic.showIcon(IconNames.Heart)
```
### Parameters
* ``icon``, the identifier of the icon to display
* ``interval`` (optional), the time to display in milliseconds. default is 400.
2017-02-27 18:07:36 +01:00
### Example
This program shows a happy face and then a sad face with the ``show icon`` function, with a one second pause in between.
```blocks
basic.showIcon(IconNames.Happy)
basic.pause(1000)
basic.showIcon(IconNames.Sad)
```
### See also
[showLeds](/reference/basic/show-leds)