pxt-calliope/docs/getting-started/screen.md

98 lines
1.9 KiB
Markdown
Raw Normal View History

2016-06-24 08:52:24 +02:00
# Screen
### ~avatar avatar
2016-11-02 01:44:37 +01:00
There are 25 bright LEDs on the @boardname@ screen. Let's use them to create some cool animations!
2016-06-24 08:52:24 +02:00
### ~
### Happy unhappy face
Draw an unhappy face instead of the blank screen. Click on the dots
in the second ``show leds`` block until it matches the blocks below.
Now you have an **animation** (cartoon) that shows a happy face,
then an unhappy one, then a happy one again, forever (or until
2016-11-02 01:44:37 +01:00
you turn off your @boardname@)!
2016-06-24 08:52:24 +02:00
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# . . . #
. # # # .
`)
basic.showLeds(`
. . . . .
. # . # .
. . . . .
. # # # .
# . . . #
`)
});
```
Click **Download** to move your program to the @boardname@!
2016-06-24 08:52:24 +02:00
### Your turn!
Pile up more ``show leds`` blocks to create an animation! Create an
animation with at least 5 pictures. What does this animation show?
```blocks
basic.forever(() => {
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# . . . #
. # # # .
`)
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# # # # #
. . . . .
`)
basic.showLeds(`
. . . . .
. # . # .
. . . . .
. # # # .
# . . . #
`)
basic.showLeds(`
. . . . .
. # . # .
. . . . .
# # # # #
. . . # #
`)
basic.showLeds(`
. . . . .
# . # . .
. . . . .
# . . . #
. # # # .
`)
basic.showLeds(`
. . . . .
. . # . #
. . . . .
# . . . #
. # # # .
`)
});
```
Click **Download** to move your program to the @boardname@!
2016-06-24 08:52:24 +02:00
#### ~hint
You can find the ``show leds`` block in the **Basic** part of the editor.
#### ~
2016-06-24 22:27:34 +02:00
### ~button /getting-started/buttons
NEXT: BUTTONS
### ~