@ -2,12 +2,12 @@
|
||||
|
||||
Learn to create an answering machine on the @boardname@
|
||||
|
||||
### ~avatar avatar
|
||||
## ~avatar avatar
|
||||
|
||||
|
||||
Let's learn how to create an answering machine!
|
||||
|
||||
### ~
|
||||
## ~
|
||||
|
||||
We will use `show string` to show text on the LED screen. *String* is a common name for *text* in programming languages. The function `show string` scrolls the text column by column at a *150* milliseconds interval.
|
||||
|
||||
@ -15,9 +15,9 @@ We will use `show string` to show text on the LED screen. *String* is a common n
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
```
|
||||
|
||||
### ~avatar boothing
|
||||
## ~avatar boothing
|
||||
|
||||
Excellent, you're ready to continue with the [challenges](/lessons/answering-machine/challenges)!
|
||||
|
||||
### ~
|
||||
## ~
|
||||
|
||||
|
@ -10,7 +10,7 @@ Complete the [answering machine](/lessons/answering-machine/activity) activity a
|
||||
basic.showString("ASK ME A QUESTION")
|
||||
```
|
||||
|
||||
### Challenge 1
|
||||
## Challenge 1
|
||||
|
||||
Now we need to reply after someone asks @boardname@ a yes or no question. We want to respond `YES` when button `A` is pressed. Add a condition for button `A` and inside it show the string `YES`.
|
||||
|
||||
@ -23,7 +23,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
* `Run` the code to see if it works as expected.
|
||||
|
||||
### Challenge 2
|
||||
## Challenge 2
|
||||
|
||||
What if @boardname@'s answer to the question is no? Let's have `NO` be displayed when button `B` is pressed. Add a condition for button `B` and inside it show the string `NO`.
|
||||
|
||||
@ -40,6 +40,6 @@ input.onButtonPressed(Button.B, () => {
|
||||
|
||||
* `Run` the code to see if it works as expected.
|
||||
|
||||
### Challenge 3
|
||||
## Challenge 3
|
||||
|
||||
When you are asked a yes or no question, do you always say yes or no? Add a condition for `on shake` that displays `MAYBE`.
|
Reference in New Issue
Block a user