Include unplugged intro step in tutorials (#1376)
This commit is contained in:
parent
55d2b9ea1e
commit
3a217e910e
@ -1,7 +1,11 @@
|
|||||||
# Coin Flipper
|
# Coin Flipper
|
||||||
|
|
||||||
|
## Introduction @unplugged
|
||||||
|
|
||||||
Let's create a coin flipping program to simulate a real coin toss. We'll use icon images to represent a ``heads`` or ``tails`` result.
|
Let's create a coin flipping program to simulate a real coin toss. We'll use icon images to represent a ``heads`` or ``tails`` result.
|
||||||
|
|
||||||
|
![Simulating coin toss](/static/mb/projects/coin-flipper/coin-flipper.gif)
|
||||||
|
|
||||||
## Step 1
|
## Step 1
|
||||||
|
|
||||||
Get an ``||input:on button A pressed||`` block from the ``||input:Input||`` drawer in the toolbox. We'll put our coin flipping code in here.
|
Get an ``||input:on button A pressed||`` block from the ``||input:Input||`` drawer in the toolbox. We'll put our coin flipping code in here.
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# Flashing Heart
|
# 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
|
## Step 1 @fullscreen
|
||||||
|
|
||||||
Place the ``||basic:show leds||`` block in the ``||basic:on start||`` block and draw a heart.
|
Place the ``||basic:show leds||`` block in the ``||basic:on start||`` block and draw a heart.
|
||||||
@ -26,16 +32,16 @@ basic.showLeds(`
|
|||||||
. # # # .
|
. # # # .
|
||||||
. . # . .`);
|
. . # . .`);
|
||||||
basic.showLeds(`
|
basic.showLeds(`
|
||||||
. # . # .
|
. . . . .
|
||||||
# . # . #
|
. . . . .
|
||||||
# . . . #
|
. . . . .
|
||||||
. # . # .
|
. . . . .
|
||||||
. . # . .`);
|
. . . . .`);
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 3 @fullscreen
|
## 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
|
```blocks
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
@ -47,17 +53,18 @@ basic.forever(() => {
|
|||||||
. . # . .`
|
. . # . .`
|
||||||
);
|
);
|
||||||
basic.showLeds(`
|
basic.showLeds(`
|
||||||
. # . # .
|
. . . . .
|
||||||
# . # . #
|
. . . . .
|
||||||
# . . . #
|
. . . . .
|
||||||
. # . # .
|
. . . . .
|
||||||
. . # . .`);
|
. . . . .`
|
||||||
|
);
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
## Step 4 @fullscreen
|
## 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
|
```blocks
|
||||||
basic.forever(() => {
|
basic.forever(() => {
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
# Love Meter
|
# Love Meter
|
||||||
|
|
||||||
|
## Introduction @unplugged
|
||||||
|
|
||||||
Make a love meter, how sweet! The @boardname@ is feeling the love, then sometimes not so much!
|
Make a love meter, how sweet! The @boardname@ is feeling the love, then sometimes not so much!
|
||||||
|
Tell everyone who you are. Show you name on the LEDs.
|
||||||
|
|
||||||
|
![Love meter banner message](/static/mb/projects/love-meter/love-meter.gif)
|
||||||
|
|
||||||
## Step 1
|
## Step 1
|
||||||
|
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# Name Tag
|
# Name Tag
|
||||||
|
|
||||||
|
## Introduction @unplugged
|
||||||
|
|
||||||
|
Tell everyone who you are. Show you name on the LEDs.
|
||||||
|
|
||||||
|
![Name scrolling on the LEDs](/static/mb/projects/name-tag/name-tag.gif)
|
||||||
|
|
||||||
## Step 1 @fullscreen
|
## Step 1 @fullscreen
|
||||||
|
|
||||||
Place the ``||basic:show string||`` block in the ``||basic:on start||`` block. Change the text to your name.
|
Place the ``||basic:show string||`` block in the ``||basic:on start||`` block. Change the text to your name.
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
# Smiley Buttons
|
# Smiley Buttons
|
||||||
|
|
||||||
|
## Introduction @unplugged
|
||||||
|
|
||||||
|
Code the buttons on the @boardname@ to show that it's happy or sad.
|
||||||
|
|
||||||
|
![Pressing the A and B buttons](/static/mb/projects/smiley-buttons/smiley-buttons.gif)
|
||||||
|
|
||||||
## Step 1 @fullscreen
|
## Step 1 @fullscreen
|
||||||
|
|
||||||
Place a ``||input:on button pressed||`` block to run code when button **A** is pressed.
|
Place a ``||input:on button pressed||`` block to run code when button **A** is pressed.
|
||||||
|
BIN
docs/static/mb/projects/coin-flipper/coin-flipper.gif
vendored
Normal file
BIN
docs/static/mb/projects/coin-flipper/coin-flipper.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
BIN
docs/static/mb/projects/flashing-heart/show-leds.gif
vendored
Normal file
BIN
docs/static/mb/projects/flashing-heart/show-leds.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 41 KiB |
BIN
docs/static/mb/projects/love-meter/love-meter.gif
vendored
Normal file
BIN
docs/static/mb/projects/love-meter/love-meter.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 277 KiB |
BIN
docs/static/mb/projects/name-tag/name-tag.gif
vendored
Normal file
BIN
docs/static/mb/projects/name-tag/name-tag.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 199 KiB |
BIN
docs/static/mb/projects/smiley-buttons/smiley-buttons.gif
vendored
Normal file
BIN
docs/static/mb/projects/smiley-buttons/smiley-buttons.gif
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
Loading…
Reference in New Issue
Block a user