pxt-calliope/docs/blocks/on-start.md

13 lines
260 B
Markdown
Raw Normal View History

# @extends
## #exstart
In this example, ``on start`` sets a dimmer brightness on the screen and the button handler shows a string.
```blocks
input.onButtonEvent(Button.A, ButtonEvent.Down, () => {
basic.showString("Hello!")
})
led.setBrightness(50)
```