Include unplugged intro step in tutorials (#1376)

This commit is contained in:
Galen Nickel
2018-10-10 15:38:51 -07:00
committed by Peli de Halleux
parent 55d2b9ea1e
commit 3a217e910e
10 changed files with 40 additions and 12 deletions

View File

@ -1,5 +1,11 @@
# Flashing Heart
## Introduction @unplugged
Learn how to use the LEDs and make a flashing heart!
![Heart shape in the LEDs](/static/mb/projects/flashing-heart/show-leds.gif)
## Step 1 @fullscreen
Place the ``||basic:show leds||`` block in the ``||basic:on start||`` block and draw a heart.
@ -26,16 +32,16 @@ basic.showLeds(`
. # # # .
. . # . .`);
basic.showLeds(`
. # . # .
# . # . #
# . . . #
. # . # .
. . # . .`);
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .`);
```
## Step 3 @fullscreen
Move the blocks inside the ``||basic:forever||`` to repeat the animation.
But we only see the heart blink once. To have it continue to blink, move the blocks inside the ``||basic:forever||`` to make the animation repeat.
```blocks
basic.forever(() => {
@ -47,17 +53,18 @@ basic.forever(() => {
. . # . .`
);
basic.showLeds(`
. # . # .
# . # . #
# . . . #
. # . # .
. . # . .`);
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .`
);
})
```
## Step 4 @fullscreen
Place more ``||basic:show leds||`` blocks to create your own animation.
Now let's get fancy and place more ``||basic:show leds||`` blocks to create your own animation.
```blocks
basic.forever(() => {