pxt-calliope/docs/lessons/flashing-heart.md

40 lines
1004 B
Markdown
Raw Normal View History

2016-03-25 16:47:20 -07:00
# flashing heart blocks lesson
2016-04-01 16:22:47 -07:00
Learn how to create LED images with a global variable.
2016-03-25 16:47:20 -07:00
## Topic
Pause
## Quick links
2016-04-13 08:27:45 -07:00
* [activity](/lessons/flashing-heart/activity)
* [quiz](/lessons/flashing-heart/quiz)
* [quiz answers](/lessons/flashing-heart/quiz-answers)
* [challenges](/lessons/flashing-heart/challenges)
2016-03-25 16:47:20 -07:00
## Prior learning/place of lesson in scheme of work
Learn how to `show LEDs` by showing an image on the LED screen. We will be learning how to create a blinking app using a forever loop as well as simple commands, such as show LEDs, pause, and clear screen.
## Documentation
2016-04-04 22:33:13 -07:00
```cards
basic.forever(() => {})
2016-03-29 15:59:00 -07:00
basic.showLeds(`
. . . . .
. . . . .
. . # . .
. . . . .
. . . . .
`)
basic.pause(100)
basic.clearScreen()
```
2016-03-25 16:47:20 -07:00
2016-03-29 15:59:00 -07:00
## Objectives
2016-03-25 16:47:20 -07:00
2016-03-29 15:59:00 -07:00
* learn how to repeat code in the background forever
* learn how to show LEDs on the LED screen
* learn how to pause your code for the specified number of milliseconds
* learn how to turn off all the LED lights on the LED screen