More updates for 'Try' and 'Use' topix (#375)

This commit is contained in:
Galen Nickel 2018-03-22 14:16:14 -07:00 committed by GitHub
parent 6e714caa2b
commit 988bec00b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 66 additions and 62 deletions

View File

@ -1,26 +1,26 @@
# Try
[IMG: Neutral Image Display on EV3 Brick with Music Notes]
Get a quick introduction to programming with EV3.
![Display on EV3 Brick with Music Notes](/static/getting-started/01_EyesOn_Intro.png)
We are excited to help you get started with LEGO MINDSTORMS Education EV3. In this project we will guide you through connecting your EV3 brick, creating your first program, controlling a Large Motor, a Touch Sensor and a Color Sensor. These steps can take up to 45 minutes.
## Turn on your EV3 Brick
[IMG: Hand pressing power button, Neutral Image Display, EV3 Brick]
Power on your EV3 Brick by pressing the Center Button.
![Hand pressing power button](/static/getting-started/02_PowerOn.png)
## Connect Your EV3 Brick to Your Device
[IMG: Hand on cable & computer, Neutral Image Display, EV3 Brick]
Use the USB cable to connect your EV3 Brick to your device.
![IMG: Hand on cable & computer, Neutral Image Display, EV3 Brick](/static/getting-started/03_Insert%20USB-02.png)
## Create and Run your First Program
1) Create the program shown here:
**Code it:** Create the program shown here.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
@ -29,25 +29,26 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
* Drag a Brick Screen show mood block inside the on button block
* Change mood to
* Drag out a ``||brick:on button||`` block from Buttons section in the ``||brick:Brick||`` Toolbox drawer.
* Drag a Brick Screen ``||brick:show mood||`` block inside the ``||brick:on button||`` block.
* Change mood to ``neutral``.
```block
brick.showMood(moods.neutral)
```
* Drag a Music play sound effect block below the show mood block
* Change sound effect to
* Drag a Music ``||music:play sound effect||`` block below the ``||brick:show mood||`` block.
* Change sound effect to ``communication hello``.
```block
music.playSoundEffect(sounds.communicationHello)
```
2) Click Download and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Did It Work?
[IMG: Neutral Image Display, EV3 Brick]
![EV3 Brick with eyes on the display](/static/getting-started/05_EyesOn.png)
Verify that the program you just created shows eyes on the Brick Display, and that the EV3 Brick played the sound “Hello!”
@ -55,15 +56,15 @@ Verify that the program you just created shows eyes on the Brick Display, and th
## Connect a Large Motor
[IMG: EV3 Brick with hands connecting Large Motor to Port D]
Now you will learn to control the Large Motor.
![EV3 Brick with hands connecting Large Motor to Port D](/static/getting-started/06_PlugInLargeMotor.png)
Connect a Large Motor to **Port D** of your EV3 Brick using any of the connector cables.
## Create and Run This Program
1) Create the program shown here:
**Code it:** Create the program shown here.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
@ -71,32 +72,34 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
* Start a new program
* Drag a ``||motors:run large A motor||`` block inside the ``||brick:on button||`` block
* Change ``large motor A`` to ``large motor D``
* Click on the **(+)** sign
* Change to ``1`` rotation
* Start a new program.
* Drag a ``||motors:run large A motor||`` block inside the ``||brick:on button||`` block.
* Change ``large motor A`` to ``large motor D``.
* Click on the **(+)** sign.
* Change to ``1`` rotation.
2) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Did It Rotate?
[IMG: Large Motor D w/Rotating “WHRRR,” Hand, EV3 Brick]
Confirm that your motor has turned one rotation at power level 50 before stopping.
![Large Motor D w/Rotating “WHRRR,” Hand, EV3 Brick](/static/getting-started/08_WorkingLargeMotor.png)
Download and run the program as many times as you want in order to verify this, or tinker with different power levels and different rotations.
## Connect a Touch Sensor
[IMG: Hands connecting Touch Sensor to **Port 1** on EV3 Brick]
We will now control the Large Motor using a Touch Sensor.
![Hands connecting Touch Sensor to Port 1 on EV3 Brick](/static/getting-started/09_Connect_Touch.png)
Keeping the Large Motor connected to **Port D**, connect a Touch Sensor to **Port 1** of your EV3 Brick.
## Modify Your Program
**Code it:** Add code to the program for the Touch Sensor.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
@ -104,30 +107,31 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
1) Add a ``||sensors:pause until touch 1||`` pressed Sensor block on top of the ``||motors:run large motor D||`` block.
* Add a ``||sensors:pause until touch 1 pressed||`` Sensor block on top of the ``||motors:run large motor D||`` block.
```block
sensors.touch1.pauseUntil(ButtonEvent.Pressed)
```
2) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Press the Touch Sensor
[IMG: Hand Touch Sensor Pressed & EV3 Brick & Large Motor]
Confirm that the Large Motor has turned one rotation AFTER you press the Touch Sensor.
![Hand Touch Sensor Pressed & EV3 Brick & Large Motor](/static/getting-started/11_TouchMotorWorking.png)
Download and run the program as many times as you want in order to verify this, or tinker with different Touch Sensor and Large Motor values.
## Connect a Color Sensor
[IMG: Hand connecting Color Sensor to Port 4, Large Motor D, EV3 Brick]
Now we will try to control the Large Motor using another sensor.
![Hand connecting Color Sensor to Port 4, Large Motor D, EV3 Brick](/static/getting-started/12_ConnectColor.png)
Keeping the Large Motor connected to **Port D**, connect the Color Sensor to **Port 4**.
Modify Your Program
**Code it:** Modify Your Program to use the Color Sensor.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
@ -136,27 +140,26 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
1) Using the same program, replace the ``||sensors:pause until touch 1||`` block with a ``||sensors:pause color sensor 3||`` for color block
* Using the same program, replace the ``||sensors:pause until touch 1||`` block with a ``||sensors:pause color sensor 3||`` for color block.
```block
sensors.color3.pauseForColor(ColorSensorColor.Green)
```
2) Select the color you want to detect (e.g., green).
* Select the color you want to detect (e.g., green).
3) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Place a Colored Brick in Front of the Color Sensor
[IMG: Colored bricks in front of Color Sensor, hands, EV3 Brick]
![IMG: Colored bricks in front of Color Sensor, hands, EV3 Brick](/static/getting-started/14_ColorSensorWorking.png)
Confirm that the Large Motor has turned one rotation AFTER the Color Sensor has detected the colored brick.
Download and run the program as many times as you want in order to verify this, or tinker with different Color Sensor and Large Motor values.
Click on the JavaScript tab and change the color the Color Sensor detects to Black, Blue, Green, Yellow, Red, White, or Brown. Use Title Case for the color names.
Click on the **JavaScript** tab and change the color the Color Sensor detects to Black, Blue, Green, Yellow, Red, White, or Brown. Use Title Case for the color names.
## Well Done!
You have now learned how to control some of the inputs and outputs of the EV3.

View File

@ -1,16 +1,17 @@
# Use
[IMG: EV3 Driving Base full w/cuboid]
Build a robot and drive into the world of robotics!
![EV3 Driving Base full w/cuboid](/static/getting-started/EV3_GettingStarted_13.jpg)
In this project we will guide you through building a Driving Base Robot and programming it to move straight and turn. You will also build and Object Detector Module, and program it to detect an object. Its a good idea to have done the [Try](/getting-started/try) sequence first.
## Connect
[IMG: Apple Picker]
What if your school had a multipurpose robot? How would you use it?
![Apple Picker Robot](/static/getting-started/02_ApplePickerRobot.jpg)
Would you use it to clean the school or plant trees?
## Build Your Driving Base Robot
@ -21,7 +22,7 @@ Build the robot driving base:
## Make It Move
1) Create a program that makes the Driving Base move forward and stop at the finish line, which is 1 meter away.
**Code it:** Create a program that makes the Driving Base move forward and stop at the finish line, which is ``1`` meter away.
Start by building this program:
@ -31,9 +32,9 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
* Drag a ``||motors:steer large B+C motor||`` block inside the ``||brick:on button||`` block
* Click on the **(+)** sign
* Change to ``1`` rotation
* Drag a ``||motors:steer large B+C motor||`` block inside an ``||brick:on button||`` block.
* Click on the **(+)** sign.
* Change to ``1`` rotation.
### ~hint
@ -41,38 +42,38 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
### ~
2) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Make It Turn
**Code it:** Create a new program that turns the Driving Base 180 degrees.
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.steer(-50, 50, 1, MoveUnit.Rotations)
})
```
1) Create a new program that turns the Driving Base 180 degrees.
### ~hint
**Hint:** You will have to modify the turn ratio and the number of rotations until the robot reaches 180 degrees.
### ~
2) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
## Add an Ultrasonic Sensor to Your Driving Base
[IMG: EV3 Ultrasonic Sensor Driving Base Building Instructions Main Image]
Build and attach an Ultrasonic Sensor to your driving base:
* [building instructions](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
[![EV3 Ultrasonic Sensor Driving Base Building Instructions Main Image](/static/lessons/common/ev3-ultrasonic-sensor-driving-base.jpg)](https://le-www-live-s.legocdn.com/sc/media/lessons/mindstorms-ev3/building-instructions/ev3-ultrasonic-sensor-driving-base-61ffdfa461aee2470b8ddbeab16e2070.pdf)
## Detect an Object
1) Create a program that moves the Driving Base and makes it stop ``6`` cm from the Cuboid.
**Code it:** Create a program that moves the Driving Base and makes it stop ``6`` cm from the Cuboid.
Create a new program:
Create a new program
```blocks
brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
motors.largeBC.tank(50, 50)
@ -82,10 +83,10 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
})
```
* Drag a ``||motors:tank large B+C||`` motor block inside the on button block
* Drag the Ultrasonic Sensor threshold ``||sensors:set ultrasonic 4||`` block and place it below the motor block
* Drag a ``|sensors:pause until ultrasonic 4||`` block and place it under the threshold block
* Drag a ``||motors:stop all motors||`` block and place it below the sensor block
* Drag a ``||motors:tank large B+C||`` motor block inside the ``||brick:on button||`` block.
* Drag the Ultrasonic Sensor threshold ``||sensors:set ultrasonic 4||`` block and place it below the motor block.
* Drag a ``|sensors:pause until ultrasonic 4||`` block and place it under the threshold block.
* Drag a ``||motors:stop all motors||`` block and place it below the sensor block.
### ~hint
@ -93,7 +94,7 @@ brick.buttonEnter.onEvent(ButtonEvent.Pressed, function () {
### ~
2) Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
**Download:** Click **Download** and follow the instructions to get your code onto your EV3 Brick. Press the center button on the EV3 Brick to run the program.
Click on the **JavaScript** tab. Change and test the number value of the Ultrasonic
Sensor.
@ -105,4 +106,4 @@ sensors.ultrasonic4.setThreshold(UltrasonicSensorEvent.ObjectDetected, 10)
**Congratulations!**
You are ready to move on to the next steps.
Try a LEGO MINDSTORMS Design Engineering, Coding, or Maker activity.
Try a LEGO MINDSTORMS [Design Engineering](/design-engineering), [Coding](/coding), or [Maker](/maker) activity.

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB