pxt-calliope/docs/lessons/smiley.md

41 lines
874 B
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# smiley blocks lesson
2016-06-02 06:19:16 +02:00
Design a blinking image lesson
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