pxt-calliope/docs/lessons/magic-logo/challenges.md
Michael Elliot Braun 1e77491b16 updated lessons
2016-03-30 15:11:05 -07:00

989 B

magic logo challenges

Coding challenges for magic logo.

Before we get started

Complete the magic logo activity and your code will look like this:

input.onLogoUp(() => {
    basic.showLeds(`
        . . # . .
        . # # # .
        # # # # #
        . . # . .
        . . # . .
        `)
})

Challenge 1

How about when the logo is down? We should display an arrow pointing downward!

@video td/videos/magic-logo-1-2

input.onLogoUp(() => {
    basic.showLeds(`
        . . # . .
        . # # # .
        # # # # #
        . . # . .
        . . # . .
        `)
})
input.onLogoDown(() => {
    basic.showLeds(`
        . . # . .
        . . # . .
        # # # # #
        . # # # .
        . . # . .
        `)
})


Challenge 2

Use the on screen up event to show a spinning arrow when the screen is turned up.

Challenge 3

Display another animation using the on screen up event.