2017-04-05 19:16:47 +02:00
|
|
|
# Flashing Heart
|
2016-05-28 06:40:59 +02:00
|
|
|
|
|
|
|
## Step 1
|
|
|
|
|
2017-09-11 19:49:40 +02:00
|
|
|
Place the ``||basic:show leds||`` block in the ``||basic:on start||`` block
|
|
|
|
and draw a heart.
|
2016-05-28 06:40:59 +02:00
|
|
|
|
2017-09-11 19:49:40 +02:00
|
|
|
```blocks
|
2016-05-28 06:40:59 +02:00
|
|
|
basic.showLeds(`
|
2016-10-13 20:32:25 +02:00
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .`
|
|
|
|
);
|
2016-05-28 06:40:59 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
## Step 2
|
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
Click ``|Download|`` to transfer your code in your @boardname@!
|
|
|
|
|
|
|
|
## Step 3
|
2016-05-28 06:40:59 +02:00
|
|
|
|
2017-08-10 07:00:53 +02:00
|
|
|
Place another ``||basic:show leds||`` block under the heart to make it blink.
|
2017-04-05 19:16:47 +02:00
|
|
|
|
2017-09-11 19:49:40 +02:00
|
|
|
```blocks
|
2016-05-28 06:40:59 +02:00
|
|
|
basic.showLeds(`
|
2016-10-13 20:32:25 +02:00
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .`);
|
2017-04-05 19:16:47 +02:00
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
|
|
|
# . # . #
|
|
|
|
# . . . #
|
|
|
|
. # . # .
|
|
|
|
. . # . .`);
|
2016-06-11 05:09:18 +02:00
|
|
|
```
|
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
## Step 4
|
2016-06-11 05:09:18 +02:00
|
|
|
|
2017-12-07 05:23:17 +01:00
|
|
|
Move the blocks inside the ``||basic:forever||`` to repeat the animation.
|
2016-06-11 05:09:18 +02:00
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
```block
|
2016-06-11 05:09:18 +02:00
|
|
|
basic.forever(() => {
|
2016-12-08 09:10:00 +01:00
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .`
|
|
|
|
);
|
2017-04-05 19:16:47 +02:00
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
|
|
|
# . # . #
|
|
|
|
# . . . #
|
|
|
|
. # . # .
|
|
|
|
. . # . .`);
|
2016-06-11 05:09:18 +02:00
|
|
|
})
|
2016-06-11 20:40:09 +02:00
|
|
|
```
|
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
## Step 5
|
2016-06-11 20:40:09 +02:00
|
|
|
|
2017-12-07 05:23:17 +01:00
|
|
|
Click ``|Download|`` to transfer your code in your @boardname@ and watch the hearts flash!
|
2016-06-11 20:40:09 +02:00
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
## Step 6
|
|
|
|
|
2017-08-10 07:00:53 +02:00
|
|
|
Place more ``||basic:show leds||`` blocks to create your own animation.
|
2017-04-05 19:16:47 +02:00
|
|
|
|
2017-09-11 19:49:40 +02:00
|
|
|
```blocks
|
2016-06-11 20:40:09 +02:00
|
|
|
basic.forever(() => {
|
2016-12-08 09:10:00 +01:00
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
|
|
|
# # # # #
|
|
|
|
# # # # #
|
|
|
|
. # # # .
|
|
|
|
. . # . .`
|
|
|
|
);
|
|
|
|
basic.showLeds(`
|
|
|
|
. # . # .
|
2017-04-05 19:16:47 +02:00
|
|
|
# . # . #
|
|
|
|
# . . . #
|
|
|
|
. # . # .
|
2016-12-08 09:10:00 +01:00
|
|
|
. . # . .`);
|
2017-04-05 19:16:47 +02:00
|
|
|
basic.showLeds(`
|
|
|
|
. . . . .
|
|
|
|
. # . # .
|
|
|
|
. # # # .
|
|
|
|
. . # . .
|
|
|
|
. . . . .`);
|
2016-06-11 20:40:09 +02:00
|
|
|
})
|
2016-06-25 23:22:50 +02:00
|
|
|
```
|
2016-12-08 09:10:00 +01:00
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
## Step 7
|
2016-12-08 09:10:00 +01:00
|
|
|
|
2017-04-05 19:16:47 +02:00
|
|
|
Click ``|Download|`` to transfer your code in your @boardname@!
|