2.1.28, initiation update to PXT v5.28.24 (#54)
This commit is contained in:
committed by
Peli de Halleux
parent
38a964516e
commit
5c114a0c57
46
docs/projects/flashing-heart.md
Normal file
46
docs/projects/flashing-heart.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# Flashing Heart
|
||||
|
||||
## Introduction @unplugged
|
||||
|
||||
Learn how to use the LEDs and make a flashing heart!
|
||||
(Want to learn how lights work? [Watch this video](https://youtu.be/qqBmvHD5bCw)).
|
||||
|
||||
|
||||

|
||||
|
||||
## Step 1 @fullscreen
|
||||
|
||||
Place the ``||basic:show leds||`` block in the ``||basic:forever||`` block and draw a heart.
|
||||
|
||||

|
||||
|
||||
## Step 2 @fullscreen
|
||||
|
||||
Place another ``||basic:show leds||`` block. You can leave it blank and draw what you want.
|
||||
|
||||
```blocks
|
||||
basic.forever(function() {
|
||||
basic.showLeds(`
|
||||
. # . # .
|
||||
# # # # #
|
||||
# # # # #
|
||||
. # # # .
|
||||
. . # . .`);
|
||||
basic.showLeds(`
|
||||
. . . . .
|
||||
. . . . .
|
||||
. . . . .
|
||||
. . . . .
|
||||
. . . . .`);
|
||||
})
|
||||
```
|
||||
|
||||
## Step 3 @fullscreen
|
||||
|
||||
Look at the virtual @boardname@, you should see the heart and your drawing blink on the screen.
|
||||
|
||||

|
||||
|
||||
## Step 4 @fullscreen
|
||||
|
||||
If you have a @boardname@ connected, click ``|Download|`` to transfer your code and watch the hearts flash!
|
||||
Reference in New Issue
Block a user