pxt-calliope/docs/reference/led/stop-animation.md
Juri Wolf 5f7a8e5301
Updates for V4 (#197)
* update yotta defaults for 16kb devices

* refactor deprecated blocks

* updates for button events

* update button events

* update refference

* update docs

* update docs

* update button event blocks

* update docs

* update block id
2022-08-10 09:36:19 -07:00

33 lines
730 B
Markdown

# Stop Animation
Stop the animation that is playing and any animations that are waiting to
play.
```sig
led.stopAnimation()
```
## Example
This program sets up the ``stop animation`` part of the program,
and then shows a string that you can stop with button ``B``.
```blocks
input.onButtonEvent(Button.B, input.buttonEventClick(), () => {
led.stopAnimation();
});
basic.showString("STOP ME! STOP ME! PLEASE, WON'T SOMEBODY STOP ME?");
```
## ~hint
It's important to set up ``stop animation`` before showing the
animation, so the ``stop animation`` part of the program will be ready
to go.
## ~
## See Also
[show leds](/reference/basic/show-leds), [show icon](/reference/basic/show-icon), [plot](/reference/led/plot)