Skip to content

Latest commit

 

History

History
102 lines (67 loc) · 1.59 KB

custom_tutorial.md

File metadata and controls

102 lines (67 loc) · 1.59 KB

Flashing Heart

Introduction @unplugged

Learn how to use the LEDs and make a flashing heart! (Want to learn how lights work? Watch this video).

Heart shape in the LEDs

Step 1 @fullscreen

Place the ||basic:show leds|| block in the ||basic:forever|| block and draw a heart.

An animation that shows how to drag a block and paint a heart

Step 2

Place another ||basic:show leds|| block. You can leave it blank and draw what you want.

basic.forever(function() {
    //@highlight
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .`);
    basic.showLeds(`
        . . . . .
        . . . . .
        . . . . .
        . . . . .
        . . . . .`);
})

Step 3

Look at the virtual @boardname@, you should see the heart and your drawing blink on the screen.

Step 4

If you have a @boardname@ connected, click |Download| to transfer your code and watch the hearts flash!

Step 5

Placeholder

Step 6

Placeholder

Step 7

Placeholder

basic.forever(function() {
    basic.showLeds(`
        . # . # .
        # # # # #
        # # # # #
        . # # # .
        . . # . .`);
    basic.showLeds(`
        . . . . .
        . . . . .
        . . . . .
        . . . . .
        . . . . .`);
})

Step 8

Placeholder

Step 9

Placeholder

Step 10

Placeholder

Step 11

Placeholder

Step 12

Placeholder

Step 13

Placeholder

Step 14

Placeholder