Modify tutorials for single download step (#1093)

* Modify tutorials for single dl step

* Some more fixes

* coin flip typer
This commit is contained in:
Galen Nickel
2018-08-17 07:58:45 -07:00
committed by Guillaume Jenkins
parent 0919a4e886
commit f4aa25e2bd
5 changed files with 54 additions and 56 deletions

View File

@@ -2,7 +2,7 @@
## Step 1
Welcome! Place the ``||basic:show string||`` block in the ``||basic:on start||`` slot. Replace the ``"Hello"`` text with your name. Did you see it scroll?
Welcome! Place the ``||basic:show string||`` block in the ``||basic:on start||`` slot. Replace the ``"Hello"`` text with your name. Did you see it scroll in the simulator?
```blocks
basic.showString("Micro!")
@@ -10,11 +10,7 @@ basic.showString("Micro!")
## Step 2
Connect a USB cable to the @boardname@ and click ``|Download|``. Save the program to the **@drivename@** drive. This transfers your code to the @boardname@!
## Step 3
Well, the text stopped. Place the ``||basic:show string||`` block in the ``||input:on button pressed||`` slot to scroll your name when button **A** is pressed.
Well, the text stopped scrolling. Place the ``||basic:show string||`` block in the ``||input:on button pressed||`` slot to scroll your name when button **A** is pressed.
```blocks
input.onButtonPressed(Button.A, () => {
@@ -22,16 +18,10 @@ input.onButtonPressed(Button.A, () => {
});
```
## Step 4
Click ``|Download|`` to save and transfer your code again, then press button **A** to scroll your text.
## Step 5
## Step 3
Place some blocks to display a smiley when button **B** is pressed.
###
Use the dropdown to find ``B``!
```blocks
@@ -46,13 +36,19 @@ input.onButtonPressed(Button.B, () => {
})
```
## Step 6
## Step 4
Place the ``||basic:show number||`` and ``||Math:pick random||`` blocks in an ``||input:on shake||`` slot to build a dice. A typical dice can show values from 1 to 6, so don't forget to choose the right minimum and maximum values!
Place the ``||basic:show number||`` and ``||Math:pick random||`` blocks in an ``||input:on shake||`` block to build a dice.
###
```blocks
input.onGesture(Gesture.Shake, () => {
basic.showNumber(Math.randomRange(0, 10))
})
```
When the @boardname@ is shaken, a random number between ``1`` and ``6`` is displayed on the screen.
## Step 5
A typical dice shows values from `1` to `6`. So, in ``||Math:pick random||``, don't forget to choose the right minimum and maximum values!
```blocks
input.onGesture(Gesture.Shake, () => {
@@ -60,7 +56,14 @@ input.onGesture(Gesture.Shake, () => {
})
```
## Step 6
If you have a @boardname@, connect a USB cable it and click ``|Download|``. Save the program to the **@drivename@** drive. This transfers your code to the @boardname@!
## Step 7
Well done! You've completed your first Microsoft MakeCode activity.
On the @boardname@, press button **A** to scroll your text. Press button **B** to show a smiley. Shake the @boardname@ and see which number is chosen.
## Step 8
Well done! You've completed your first Microsoft MakeCode activity.