finish first lesson
This commit is contained in:
parent
13f63c2f46
commit
899c9fd8d6
@ -1,15 +1,6 @@
|
|||||||
# Projects
|
![](/static/mb/projects/a1-display.png)
|
||||||
|
|
||||||
|
[Flashing Heart](/projects/a1-display)
|
||||||
|
|
||||||
### @short Projects
|
[Rock Paper Scissors](/projects/rock-paper-scissors)
|
||||||
|
|
||||||
### ~column
|
|
||||||
|
|
||||||
## Beginner
|
|
||||||
|
|
||||||
* [Rock Paper Scissors](/projects/rock-paper-scissors)
|
|
||||||
|
|
||||||
### ~
|
|
||||||
|
|
||||||
### ~column
|
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
## Getting started
|
![](/static/mb/projects/a1-display.png)
|
||||||
• Go to https://m.pxt.io/
|
|
||||||
• To create a new project, click new Project
|
Use the LEDs to display a flashing heart.
|
||||||
Tap or click Blocks.
|
|
||||||
|
|
||||||
## Step 1
|
## Step 1
|
||||||
|
|
||||||
@ -16,8 +15,6 @@ basic.showLeds(`
|
|||||||
. . # . .`);
|
. . # . .`);
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you are done coding, don't forget to run your code with the Play button.
|
|
||||||
|
|
||||||
## Step 2
|
## Step 2
|
||||||
|
|
||||||
Add a [pause](/reference/basic/pause) to wait and [clear screen](/reference/basic/clearScreen) to turn off the LEDs.
|
Add a [pause](/reference/basic/pause) to wait and [clear screen](/reference/basic/clearScreen) to turn off the LEDs.
|
||||||
@ -31,4 +28,21 @@ basic.showLeds(`
|
|||||||
. . # . .`);
|
. . # . .`);
|
||||||
basic.pause(500);
|
basic.pause(500);
|
||||||
basic.clearScreen();
|
basic.clearScreen();
|
||||||
|
```
|
||||||
|
|
||||||
|
## Step 3
|
||||||
|
|
||||||
|
Put a [forever loop](/reference/basic/forever) around it.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
basic.showLeds(`
|
||||||
|
. # . # .
|
||||||
|
# # # # #
|
||||||
|
# # # # #
|
||||||
|
. # # # .
|
||||||
|
. . # . .`);
|
||||||
|
basic.pause(500);
|
||||||
|
basic.clearScreen();
|
||||||
|
})
|
||||||
```
|
```
|
BIN
docs/static/mb/projects/a1-display.png
vendored
BIN
docs/static/mb/projects/a1-display.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 14 KiB |
Loading…
Reference in New Issue
Block a user