This course includes resources provided by the following:
LEGO Education
CS-STEM Network from Carnegie Mellon University
EV3-Scratch documentation provided by Raphael Holzer
Joe Olayvar & Evelyn Lindberg in association with the Washington State Library
π Click here to access the LEGO Education website.
π Click here to access the EV3-Scratch documentation.
π Click here to access the online EV3 course from CS2N.
π Click here to access the LEGO Mindstorms EV3 Programming Basics document in its entirety.
βΆοΈ Click here to access the entire LEGO Mindstorms EV3 YouTube playlist from the Washington State Library.
The Robot Movement lesson introduces EV3 Classroom and how to write programs that move the robot forward, backward, make turns, and control the robotβs gripper arm.
β¬οΈ Install It
Before continuing, ensure that your computer has the EV3 Classroom app installed.
π§ Build It
Before you continue, ensure that you have completed the following build:
Base Unit (aka Driving Base)
π Introduction to Moving Forward
π Learn It
Carefully read and/or watch the instructional media and respond to the related questions.
10 points
10
Question 1
1.
Why is it important to inspect industrial facilities often?
10 points
10
Question 2
2.
What is the advantage of Sensabot over human inspectors?
10 points
10
Question 3
3.
In addition to basic movement, what specific skill will you need to complete this challenge?
βΈ Moving / Steering Forward
In this lesson, you will program the robot to move forward for 3 wheel rotations.
Step 1: Open EV3 Classroom
Begin by opening the LEGO MINDSTORMS EV3 Classroom app.
Step 2: Create a New Program
Create a new program by clicking the [+] New Project button in the EV3 Classroom app window.
Step 3: Place Move Forward Block
Grab a βmove [forward] for [1] rotationsβ block, and drag it under the βwhen program startsβ block. The two blocks should automatically attach.
This βmove forwardβ block is set to move the robot βforwardβ for 1 rotation.
Step 4: Change Rotations Value
To make the robot go forward for 3 rotations, change this Rotations value to 3.
Step 5: Add Exit Block
Lastly, drag a βstop [and exit program]β block from the Control palette, and place it at the bottom of stack of blocks. This will tell the robot to stop, and end the program.
Step 6: Rename Program
Click on the triple dot menu next to the program name, and select βRenameβ. Save the program as βMovingForwardβ.
Note: The project saves automatically even if you do not rename it!
Step 7: Connect EV3 to Computer
Make sure your EV3 is turned on and connected to your computer using the USB cable (or through Bluetooth).
Note: The software tells you when the robot is connected when the red robot icon in the top left corner becomes green.
Step 8: Download Program
Download the program to the EV3 by pressing the Download button in the lower-right corner of the programming software.
Step 9: Place Robot
Once the program is done loading, disconnect your robot from the USB cable, and place it in an open area.
Step 10: Run Program
To run the program, use the left and right buttons to scroll to the βFile Navigationβ icon, use the up and down buttons to select MovingForward if it isnβt already selected, and press the center button to select it.
Use the down button to scroll to MovingForwardβs βProgramβ, and press the center button again to run.
Try it! Hold Position vs. Float
Place a βset movement motors to [hold position] at stopβ block at the start of your program. What is the difference between the βhold positionβ and βfloatβ settings?
Try It! Measure One Rotation
Have your robot move forward for one rotation. Use a ruler to measure how far a single rotation travels in centimeters (cm).
π‘ Did You Know? EV3 Menus
Did you notice the four main areas at the top of the EV3's on-screen menu?
Run Recent: Lists the most recent programs you have to run. Not that if they are all named "Program", they might be hard to tell apart!
File Navigation: Browse through all the Projects you have loaded on the EV3. Select and run Programs from inside each Project! Folders starting with "BRK" contain Brick Apps programs (see left).
Brick Apps: This mode contains utilities that let you view and set motor and sensor values for troubleshooting purposes. The Brick Program app lets you write simple programs or log sensor values directly on the brick.
Settings: Adjust the speaker volume, auto-sleep timer, networking, and other system settings.
π‘ Did You Know? Auto-detecting Ports
Did you notice that the EV3 automatically detected the Ports that your motors were plugged into?
The EV3 features a technology called "AutoID" that allows it to automatically detect, identify, and configure any EV3 hardware plugged into it! However, it can only tell what type of device is plugged in. It cannot detect certain other information, like what size your wheels are, or which motor is on the left vs. the right side of the robot.
10 points
10
Question 4
4.
How do you create a new program in EV3 Classrooms?
10 points
10
Question 5
5.
True or False: Programs made in EV3 Classrooms are saved automatically.
10 points
10
Question 6
6.
Which option would you choose if you want the motors to stop exactly at the requested amount?
πMini-Challenge:
π 50 cm
Place two pieces of tape 50 cm apart. Your robot should travel exactly from one tape to the other to complete the challenge!
Make sure to set your motors to "Hold Position" to stop directly on the line.
π A virtual version of this challenge is available HERE.
100 points
100
20 points
20
Question 8
8.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 9
9.
β¬οΈ Upload It: Upload your completed program.
π¦Ύ Arm Control
In this step, we will program the robot to lower and raise its arm.
Step 1: Open EV3 Classroom
Open EV3 Classroom and click the [+] button to create a new program.
Step 2: Add Motor Block
The REM Botβs arm is controlled by a Motor block. Add a Motor block (set to Motor A) to the program.
Step 3: Set Rotations
To raise the arm, the motor needs to make about one-quarter of a full rotation.
Click the number next to "rotations" and change it to 0.25 β one-quarter of a full rotation.
Step 4: Add Exit Block
Drag a βstop [and exit program]β block from the Control palette, and place it at the bottom of the stack.
Step 5: Download and Run Program
Download the program to your EV3, set the arm to the "down" position, then run the program.
The motor should turn 90 degrees, lifting the arm into the "up" position.
Step 6: Add Second Motor Block
Now return to your program, and drag a second Motor block after the first. Change the direction setting on this Motor block from βclockwiseβ to βcounterclockwiseβ.
Step 7: Set rotations
Also, change its Rotations from 1 to 0.25.
Step 8: Rename Program
Save your program as βArmControlβ.
Step 9: Download and Run Program
Download the program to your robot, set the arm to the "down" position, and then run the program.
π‘ Did You Know? Getting the Program Stuck
What happens if a block cannot complete its action?
Try running your program with its arm in the "up" position. Watch carefully so you can answer the following questions.
10 points
10
Question 10
10.
What happens if a block cannot complete its action?
10 points
10
Question 11
11.
True or false: Programming the Arm motor block to spin for .50 rotations will make the arm move 90-degrees.
10 points
10
Question 12
12.
Which of the following blocks is used to make the arm spin backwards?
πMini-Challenge:
π¦ Cargo Retrieval
Program your robot to:
Raise its arm
Move 50cm to the box
Drop the arm down
Back up to the robot's starting position with the box
Place two pieces of black electrical tape 50 cm apart.
Your robot should travel to the block and bring it back to the starting line.
π A virtual version of this challenge is available HERE.
Hint 1: Remember to raise the arm before moving the robot forward.
Hint 2: Line up the block for the robot to use its arm around it.
Hint 3: Use some fine-tuned commands (i.e. pausing after stopping, moving slower)
Hint 4: Pause for a couple of seconds after commands for consistency.
100 points
100
20 points
20
Question 14
14.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 15
15.
β¬οΈ Upload It: Upload your completed program.
πChallenge:
π‘ Sensabot
Challenge Overview
For this challenge, program your EV3 robot to move from its starting location to three different lines, stopping at each line to perform an inspection, represented by lowering and raising the robotβs arm. After completing inspections at all three lines, the robot should then back up and return home to its starting location.
Challenge Details
Rules and Procedures:
Create the robotβs starting area with electrical tape that is slightly larger than the robot.
Use the electrical tape to mark three (3) inspection points along the robot's path. The exact location is not important, but they should not be moved once the board is finalized.
The robot must start inside the starting box (no parts over the line) and with its arm raised.
The robot must move and stop at each line, lowering and raising its arm, representing the inspection process. The arm must be directly over each line when the inspection is performed.
The robot must return to its starting box after completing the inspection process at the third line. The entire robot must be inside the box (no parts over the line)
Hints:
Use a meter stick or ruler to measure the distances to each line on the board so you know how far you need to move each time!
Try finding the number of centimeters your robot travels in each rotation, and using that to find the number of rotations you need
You can also make a test run, then calculate βhow many times as farβ you need to move to get to each line, compared to the test run
100 points
100
20 points
20
Question 17
17.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 18
18.
β¬οΈ Upload It: Upload your completed program.
β€΄οΈ Introduction to Turning
10 points
10
Question 19
19.
Why is it important for the robot be able to drive through an orchard?
10 points
10
Question 20
20.
What is the advantage of an Autonomous Tractor over human drivers?
10 points
10
Question 21
21.
In addition to basic turning, what additional, new knowledge will help you complete this challenge?
π Turning in Place
Introduction: Turning in Place
In this step, you will program the robot to turn to its right while remaining in the same spot.
Step 1: Start New Project
Create a new project and program by clicking the + button on the Project Bar in the EV3 Programming Software.
Step 2: Add Move Straight Block
Add a βMove [straight] for [1 rotations]β block to the program.
Step 3: Set Direction
Click the βstraight: 0" area of the Block. A βdialβ will appear, allowing you to set the βsharpnessβ of the turn in the robot's movement β the balance between forward motion and turning motion.
0 means no curve β the command will move straight forward or backward.
Drag the dial all the way to the right (clockwise), until the number reads βright: 100β. This tells the robot to perform a movement that is 100% turning motion to the right.
Step 4: Add Exit Block
Drag a βstop [and exit program]β block from the Control palette, and place it at the bottom of the stack.
Step 5: Rename Project
Rename your project as βTurnRightβ
Step 6: Download and Run
Turn on your EV3, plug it into your computer, and download and run your program.
π‘ Did You Know? Wheel Pointers
The white pointers on the EV3's tires help you to see how much the wheels are rotating.
Run your TurnRight program again, and watch the pointer on the robot's right wheel.
10 points
10
Question 22
22.
How much did the robot's wheel turn during this movement?
10 points
10
Question 23
23.
According to the block below, the robot willβ¦
10 points
10
Question 24
24.
True or false: The dial inside the move block is used to determine the sharpness of a turn.
πMini-Challenge:
β€΄οΈ 90-Degree Turn
Place two pieces of tape so they form a 90-degree angle. Place the robot so that it faces along the edge of one piece of tape. Program the robot to turn right 90 degrees (using a 100 "Steering" value), to face directly along the other piece of tape.
π A virtual version of this challenge is available HERE.
100 points
100
20 points
20
Question 26
26.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 27
27.
β¬οΈ Upload It: Upload your completed program.
π Other Turns
In this step, you will learn about the mechanical nature of turning, and learn to program one-wheel turns and custom turns using the βMove [straight] for rotationsβ Block.
Turning
All of your robot's movements are performed using two motors. The motion you get is determined by using different combinations of powers on those motors.
If both motors go forward, the robot moves straight forward.
If both motors run backward, the robot moves straight backward.
If they run in opposite directions, the robot spins in place.
If the left side moves forward while the right moves back, the robot spins to the right. If the right side moves forward while the left moves back, the robot spins to the left.
But what about other combinations?
Step 1: Open EV3 Classroom
Open EV3 Classroom and create a new program.
Step 2: Add Move For Rotations Block
Instead of a βMove [straight]β Block, add a βMove for [rotations] at 50-50 % speedβ block to the program.
Step 3: Set Power Levels
Set the left motor's power to forward 50, and set the right motor's power to 0.
Step 4: Add Exit Block
Drag a βstop [and exit program]β block from the Control palette, and place it at the bottom of the stack.
Step 5: Rename Project
Rename the project as "TankMove"
Step 6: Download and Run
Download and run the program. The robot's left motor moves forward at 50% power, while the right motor stays stationary. The robot, as a consequence, performs a different kind of "swinging wide" turn.
Try it! Different Motions
You can create many different types of motion by combining different motor speeds.
Try each of the following to see what you get!
Try each of the following to see what you get!
10 points
10
Question 28
28.
What will the robot do if both motors spin in opposite directions at the same velocity?
10 points
10
Question 29
29.
Which of the following blocks should be used if you want to program motors at different speeds?
πMini-Challenge:
ποΈ Dizzy Drills
Program your robot to go out to an object, drive around it, and then come back!
With a line and an obstacle placed away from the line, start the robot at the line, program it to drive out to the obstacle, go around it, and then come back to the line.
π A virtual version of this challenge is available HERE.
100 points
100
20 points
20
Question 31
31.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 32
32.
β¬οΈ Upload It: Upload your completed program.
πChallenge:
πOrchard Tractor
Challenge Overview
For this challenge, program your EV3 robot to move through TWO rows of orchard trees, represented as lines. The first line is straight on, and the next line is at an angle. The robot must make a pass on BOTH sides of each line.
Need More of a Challenge? Orchard Level 2
For this challenge, program your EV3 robot to move through THREE rows of orchard trees, represented as lines. The first line is straight on, and the next two lines are at an angle, but parallel. The robot must make a pass on BOTH sides of each line.
Challenge Details
Rules and Procedures:
For this challenge, the user can create a starting area wherever on the board.
Use three strips of electrical tape to mark two or three rows of trees. The exact locations are not important, but they should not be moved once the board is finalized.
Make sure there is enough space between the rows for the robot to pass on both sides of each row without crossing the lines.
Orchard Level 1 only uses lines 1 and 2. Level 2 uses all three lines.
Hints:
Use a meter stick or ruler to measure the distances to each line on the board so you know how far you need to move each time.
Try finding the number of centimeters your robot travels or the number of degrees its body turns in each wheel rotation.
You can also make the test run, then calculate βhow many times as farβ you need to move or turn to get the amount of movement you want, compared to a test run.
π A virtual version of this challenge is available HERE.
100 points
100
20 points
20
Question 34
34.
πΈ Document It: Capture a screenshot (or multiple screenshots) of your completed program and upload or paste it onto the Formative canvas.
20 points
20
Question 35
35.
β¬οΈ Upload It: Upload your completed program.
10 points
10
Question 36
36.
π§ Retrieval Practice:
Summarize the content of this lesson. What topics, ideas, and vocabulary were introduced?