Fix tutorial authoring for getting started (#885)
* Fix tutorial authoring for getting started Remove extra new lines * Fix other tutorials
This commit is contained in:
@ -2,8 +2,7 @@
|
||||
|
||||
## Step 1
|
||||
|
||||
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.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
|
@ -2,8 +2,7 @@
|
||||
|
||||
## Step 1
|
||||
|
||||
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.
|
||||
|
||||
```blocks
|
||||
basic.showLeds(`
|
||||
|
@ -4,8 +4,7 @@ Make a love meter, how sweet! The @boardname@ is feeling the love, then sometime
|
||||
|
||||
## Step 1
|
||||
|
||||
Let's build a **LOVE METER** machine. Place a ``||input:on pin pressed||`` block to run code
|
||||
when pin ``P0`` is pressed.
|
||||
Let's build a **LOVE METER** machine. Place a ``||input:on pin pressed||`` block to run code when pin ``P0`` is pressed.
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
@ -13,8 +12,7 @@ input.onPinPressed(TouchPin.P0, () => {
|
||||
```
|
||||
## Step 2
|
||||
|
||||
Using ``||basic:show number||`` and ``||Math:pick random||`` blocks,
|
||||
show a random number from 0 to 100 when pin ``P0`` is pressed.
|
||||
Using ``||basic:show number||`` and ``||Math:pick random||`` blocks, show a random number from 0 to 100 when pin ``P0`` is pressed.
|
||||
|
||||
```blocks
|
||||
input.onPinPressed(TouchPin.P0, () => {
|
||||
|
@ -11,8 +11,7 @@ input.onButtonPressed(Button.A, () => {
|
||||
|
||||
## Step 2
|
||||
|
||||
Place a ``||basic:show leds||`` block inside ``||input:on button pressed||``
|
||||
to display a smiley on the screen.
|
||||
Place a ``||basic:show leds||`` block inside ``||input:on button pressed||`` to display a smiley on the screen.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.A, () => {
|
||||
@ -32,8 +31,7 @@ Click ``|Download|`` to transfer your code in your @boardname@ and try pressing
|
||||
|
||||
## Step 4
|
||||
|
||||
Add ``||input:on button pressed||`` and ``||basic:show leds||`` blocks to
|
||||
display a frowney when button **B** is pressed.
|
||||
Add ``||input:on button pressed||`` and ``||basic:show leds||`` blocks to display a frowney when button **B** is pressed.
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.B, () => {
|
||||
@ -53,8 +51,7 @@ Click ``|Download|`` to transfer your code in your @boardname@ and try pressing
|
||||
|
||||
## Step 6
|
||||
|
||||
Add a secret mode where ``A`` and ``B`` are pressed together.
|
||||
In that case, add multiple ``||basic:show leds||`` blocks to create an animation...
|
||||
Add a secret mode where ``A`` and ``B`` are pressed together. In that case, add multiple ``||basic:show leds||`` blocks to create an animation...
|
||||
|
||||
```blocks
|
||||
input.onButtonPressed(Button.AB, () => {
|
||||
|
Reference in New Issue
Block a user