2016-03-26 00:47:20 +01:00
|
|
|
# magic logo challenges
|
|
|
|
|
|
|
|
Coding challenges for magic logo.
|
|
|
|
|
|
|
|
## Before we get started
|
|
|
|
|
2016-04-13 17:27:45 +02:00
|
|
|
Complete the [magic logo](/lessons/magic-logo/activity) activity and your code will look like this:
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
```blocks
|
|
|
|
input.onLogoUp(() => {
|
2016-03-31 00:11:05 +02:00
|
|
|
basic.showLeds(`
|
2016-03-26 00:47:20 +01:00
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
# # # # #
|
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## Challenge 1
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
How about when the logo is down? We should display an arrow pointing downward!
|
|
|
|
|
|
|
|
```blocks
|
|
|
|
input.onLogoUp(() => {
|
2016-03-31 00:11:05 +02:00
|
|
|
basic.showLeds(`
|
2016-03-26 00:47:20 +01:00
|
|
|
. . # . .
|
|
|
|
. # # # .
|
|
|
|
# # # # #
|
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
input.onLogoDown(() => {
|
2016-03-31 00:11:05 +02:00
|
|
|
basic.showLeds(`
|
2016-03-26 00:47:20 +01:00
|
|
|
. . # . .
|
|
|
|
. . # . .
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .
|
|
|
|
`)
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## Challenge 2
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
Use the `on screen up` event to show a spinning arrow when the screen is turned up.
|
|
|
|
|
2017-09-07 22:42:08 +02:00
|
|
|
## Challenge 3
|
2016-03-26 00:47:20 +01:00
|
|
|
|
|
|
|
Display another animation using the `on screen up` event.
|
|
|
|
|