pxt-calliope/docs/lessons/smiley.md
2016-03-29 16:17:34 -07:00

46 lines
967 B
Markdown

# smiley blocks lesson
design a blinking image lesson #docs
### @video td/videos/smiley-0
## Topic
Show LEDs
## Quick Links
* [activity](/microbit/lessons/smiley/activity)
* [quiz](/microbit/lessons/smiley/quiz)
* [quiz answers](/microbit/lessons/smiley/quiz-answers)
* [challenges](/microbit/lessons/smiley/challenges)
## Prior learning/place of lesson in scheme of work
Learn how to **show LEDs** to turn on a LED light pattern on the LED screen. We will be learning basic comments such as show LEDs and pause.
## Documentation
* **show LEDs** : [read more...](/microbit/reference/basic/show-leds)
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
```docs
input.onButtonPressed(Button.A, () => {
})
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
```
## Objectives
* learn how to show LEDs on the LED screen
* learn how to run code when an input button is pressed