Tutorial format and macro fixes (#425)
* Tutorial format and macro fixes * Remove branded names
This commit is contained in:
@ -10,7 +10,7 @@ Use the buttons to start and stop the large and medium motors.
|
||||
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``||brick:on button||`` blocks onto the Workspace (you can place these anywhere on the Workspace).
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
@ -25,7 +25,7 @@ In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``up
|
||||
|
||||

|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
})
|
||||
@ -38,7 +38,7 @@ brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out **2** ``||motors:run||`` blocks onto the Workspace, and drop one of them each into the ``||brick:on button||`` blocks.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -55,7 +55,7 @@ In the Run block that is in the On Button Down pressed block, change the speed v
|
||||
|
||||

|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -69,7 +69,7 @@ brick.buttonDown.onEvent(ButtonEvent.Pressed, function () {
|
||||
Now, let’s add a Medium motor, and specify how many rotations we want the motor to run for.
|
||||
Open the ``||brick:Brick||`` Toolbox drawer. Drag out **2** ``|brick:on button||`` blocks onto the Workspace. In the ``||brick:on button||`` blocks, use the drop-down menu to select the ``left`` and ``right`` buttons.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -88,7 +88,7 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out **2** ``||motors:run||`` blocks onto the Workspace, and drop one of them each into the ``||brick:on button left||`` and ``||brick:on button right||`` blocks.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -109,7 +109,7 @@ For the ``||motors:run||`` blocks that are in the ``||brick:on button left||`` a
|
||||
|
||||

|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -128,7 +128,7 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
In the ``||motors:run medium motor||`` blocks, click on the plus icon **(+)** to expand the blocks. Change the number of rotations from `0` to `5`.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -147,7 +147,7 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Let’s also change the speed that our Medium motors are running at. In the ``||motors:run medium motor||`` block that is in the ``||brick:on button left||`` block, change the speed from ``50%`` to ``10%``.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -166,7 +166,7 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
In the ``||motors:run medium motor||`` block that is in the ``||brick:on button right||`` block, change the speed from ``50%`` to ``100%``.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -185,7 +185,7 @@ brick.buttonRight.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Finally, let’s add a way to stop all our motors from running. Open the ``||brick:Brick||`` Toolbox drawer. Drag out an ``||brick:on button||`` block onto the Workspace.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -207,7 +207,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
Open the ``||motors:Motors||`` Toolbox drawer. Drag out a ``||motors:stop all motors||`` block onto the Workspace, and drop into the ``||brick:on button||`` enter block.
|
||||
|
||||
```block
|
||||
```blocks
|
||||
brick.buttonUp.onEvent(ButtonEvent.Pressed, function () {
|
||||
motors.largeA.run(50)
|
||||
})
|
||||
@ -227,4 +227,4 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
|
||||
|
||||
## Step 13
|
||||
|
||||
Now, let’s download our program to the brick. Plug your EV3 brick into the computer with the USB cable, and click the blue **Download** button in the bottom left of your screen. Follow the directions to save your program to the brick. Attach a Large motor to Port A, and a Medium motor to Port D. Then test your program by pressing the different buttons to see whether the correct motors are running as expected.
|
||||
Now, let’s download our program to the brick. Plug your @boardname@ into the computer with the USB cable, and click the blue **Download** button in the bottom left of your screen. Follow the directions to save your program to the brick. Attach a Large motor to Port A, and a Medium motor to Port D. Test your program by pressing the different buttons to see whether the correct motors are running as expected.
|
||||
|
Reference in New Issue
Block a user