pxt-calliope/docs/lessons/answering-machine.md

39 lines
1.0 KiB
Markdown
Raw Normal View History

2016-03-26 00:47:20 +01:00
# answering machine blocks lesson
create an answering machine on the BBC micro:bit #docs
### @video td/videos/answering-machine-0
## Topic
Show String
## Quick Links
* [activity](/microbit/lessons/answering-machine/activity)
* [quiz](/microbit/lessons/answering-machine/quiz)
* [quiz answers](/microbit/lessons/answering-machine/quiz-answers)
* [challenges](/microbit/lessons/answering-machine/challenges)
## Prior learning / place of lesson in scheme of work
Learn how to creating a message with a **string**, `show string` to write your message. We will be learning how to create a message using simple commands, such as show string and on button pressed.
## Documentation
2016-04-05 07:33:13 +02:00
```cards
2016-03-30 00:59:00 +02:00
basic.showString('Hi!')
2016-04-05 07:33:13 +02:00
input.onButtonPressed(Button.A, () => {})
2016-03-26 00:47:20 +01:00
2016-03-30 00:59:00 +02:00
```
2016-03-26 00:47:20 +01:00
2016-03-30 00:59:00 +02:00
* **on button pressed** : [read more...](/microbit/reference/input/on-button-pressed)
2016-03-26 00:47:20 +01:00
2016-03-30 00:59:00 +02:00
## Objectives
2016-03-26 00:47:20 +01:00
2016-03-30 00:59:00 +02:00
* learn how to show a string on the LED screen one character at a time
* learn how to use to register an event handler that will execute whenever an input button is pressed
2016-03-26 00:47:20 +01:00