pxt-calliope/docs/lessons/smiley.md

43 lines
882 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# smiley blocks lesson
design a blinking image lesson #docs
2016-05-27 00:24:10 +02:00
2016-03-26 00:47:20 +01:00
## Topic
Show LEDs
## Quick Links
2016-04-13 17:27:45 +02:00
* [activity](/lessons/smiley/activity)
* [quiz](/lessons/smiley/quiz)
* [quiz answers](/lessons/smiley/quiz-answers)
* [challenges](/lessons/smiley/challenges)
2016-03-26 00:47:20 +01:00
2016-03-30 01:17:34 +02:00
## Prior learning/place of lesson in scheme of work
2016-03-26 00:47:20 +01:00
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
2016-04-13 17:27:45 +02:00
* **show LEDs** : [read more...](/reference/basic/show-leds)
* **on button pressed** : [read more...](/reference/input/on-button-pressed)
2016-03-26 00:47:20 +01:00
2016-04-05 07:33:13 +02:00
```cards
input.onButtonPressed(Button.A, () => {})
2016-03-30 01:17:34 +02:00
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
```
2016-03-26 00:47:20 +01:00
2016-03-30 01:17:34 +02:00
## Objectives
2016-03-26 00:47:20 +01:00
2016-03-30 01:17:34 +02:00
* learn how to show LEDs on the LED screen
* learn how to run code when an input button is pressed
2016-03-26 00:47:20 +01:00