added pause-on-start uttorial
This commit is contained in:
@ -27,6 +27,12 @@
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/music-brick",
|
||||
"imageUrl":"/static/tutorials/music-brick.png"
|
||||
}, {
|
||||
"name": "Pause On Start",
|
||||
"description": "Don't start running immediately!",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/pause-on-start",
|
||||
"imageUrl":"/static/tutorials/pause-on-start.png"
|
||||
}]
|
||||
```
|
||||
|
||||
|
25
docs/tutorials/city-shaper.md
Normal file
25
docs/tutorials/city-shaper.md
Normal file
@ -0,0 +1,25 @@
|
||||
# City Shaper
|
||||
|
||||
## Tutorials
|
||||
|
||||
```codecard
|
||||
[
|
||||
{
|
||||
"name": "Crane Mission / Robot 1",
|
||||
"description": "Learn the basics and build your first robot driving base.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/city-shaper/robot-1"
|
||||
}, {
|
||||
"name": "Crane Mission / Robot 2",
|
||||
"description": "Program your robot to move in different ways.",
|
||||
"cardType": "tutorial",
|
||||
"url":"/tutorials/city-shaper/robot-2"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
## See Also
|
||||
|
||||
[Robot 1](/tutorials/city-shaper/robot-1),
|
||||
[Robot 2](/tutorials/city-shaper/robot-2)
|
||||
|
33
docs/tutorials/pause-on-start.md
Normal file
33
docs/tutorials/pause-on-start.md
Normal file
@ -0,0 +1,33 @@
|
||||
# Pause On Start
|
||||
|
||||
## Introduction @unplugged
|
||||
|
||||
Sometimes you don't want your program to run right away... you can use a button to wait before moving the motors.
|
||||
|
||||
## Step 1
|
||||
|
||||
Let's start by showing an image on the screen so the user knows that the robot is ready and waiting.
|
||||
|
||||
```blocks
|
||||
brick.showImage(images.informationStop1)
|
||||
```
|
||||
|
||||
## Step 2
|
||||
|
||||
Drag the ``||brick:pause until enter pressed||`` button to wait for the user to press the Enter button.
|
||||
|
||||
```blocks
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Pressed)
|
||||
```
|
||||
|
||||
## Step 3
|
||||
|
||||
Add all the motor and sensor code you want after those blocks!
|
||||
|
||||
```blocks
|
||||
brick.showImage(images.informationStop1)
|
||||
brick.buttonEnter.pauseUntil(ButtonEvent.Pressed)
|
||||
brick.showImage(images.expressionsBigSmile)
|
||||
motors.largeBC.tank(50, 50, 1, MoveUnit.Seconds)
|
||||
```
|
Reference in New Issue
Block a user