Carnegie Mellon Intro to Programming EV3
Basics
Getting Started (Objective: Students will be able to perform simple tasks related to the use of the EV3 robot and the access to the Carnegie Mellon Intro to Programming)
1) Batteries (1 Question)
A1: {Video} Unplug and plug in robot from charging station
A2: {Class Demonstration} Turn on/off Robot
2) Upload Firmware: Skip This Section
3) Ports (2 Questions)
4) Menus (7 Questions)
A1: {Video} Set Volume to 30%
A2: Be sure that the sleep timer is set to 60 minutes
Big Ideas (Objective: Students will learn helpful processes to promote the proper methodology for programming experimentation)
You do not need to write the questions and answers for the Big Ideas sections. Just watch the videos and answer the questions by clicking the correct answers. Show Mr. Merrill and you will get a stamp!
1) Big Ideas 1 & 2 (5 Questions)
2) Big Ideas 3 (3 Questions)
3) Big Ideas 4 & 5 (3 Questions)
How to Use The Software (Objective: Students will learn how to access the LEGO Mindstorms including creating, saving, downloading, running, and deleting robot programs on the EV3 robot)
1) Using the EV3 Programming Software (5 Questions) You can skip question #4
A1: {Video} Show Mr. Merrill that you can Open LEGO Mindstorms program
A2: {Video} Create the program Forward1Rotation and show to Mr. Merrill
A3: {Class Demonstration} Ask Mr. Merrill to show you how to create a new folder!!! Show Mr. Merrill that you can Save/Open programs to/from the proper folder. Use the file name Forward1Rotation. Be sure to save to your programs to the correct folder!
A4: Bluetooth Connection connect your robot by Bluetooth. You will not be using the USB cable mentioned in the video. Instead, we will connect to our robots using a Bluetooth connection. Follow these steps to get your robot connected. You may get lucky and your robot may be connected already, or it may connect very easily. If that happens, then you can skip to step 4.
Step 1. Be sure that your robot is turned on, open Lego Mindstorms, and press the + sign near the top.
Step 2. Look in the bottom right corner and press the refresh button
Step 3. Your computer should detect your robot and display its number in the box on the bottom right. Their will be a lot of robots displayed here, but it should look something like this:
If your robot number is not displayed here, ask Mr. Merrill to help you.
Step 4. Next to your robot number, click the box in the Bluetooth column to connect your robot. If the box looks like this, then your robot is already connected. Show Mr. Merrill.
A5: {Video} Run Program Forward1Rotation on the robot tables
A6: Follow the instructions below to delete programs off of your robot and show Mr. Merrill that Forward1rotation has been deleted.
Step 1. Be sure the robot is connected by Bluetooth
Step 2. Click on the Tools tab
Step 3. Select Memory Browser
Step 4. Delete Your Programs by selecting the item to be deleted and click the delete button.
Virtual Robots (Objective: Students will learn to access and use the Virtual Brick to run robot programs on the EV3 robot)
1) Programming Through Simulation (3 Questions)
2) Using Robot Virtual Worlds with Curriculum (6 Questions)
A1: {Video} Log in to the Virtual Brick by clicking Login As Guest (Show Mr. Merrill that you are logged in)
A2: {Video} Run Forward1rotation on the virtual brick using the First Program Challenge.
A3: {Video} Change rotations to 3, save the program as Forward3rotations and run in the Steering Forward Challenge.
3) Camera Options in Virtual Worlds (2 Questions)
A1: {Video} Use the First Program Challenge and adjust camera so that Mr. Merrill can see the front of the robot.
4) Measurement Toolkit (5 Questions)
A1: {Video} Use the First Program Challenge and make 3 markers then clear them.
5) Differences Programming with Simulations (2 Questions)
A1: {Video} Place the two blocks that are used on the virtual brick for the medium motor and the gyro sensor.
Behaviors (Movement)
Moving Straight (Objective: Students will learn to create programs that will instruct the robot to move forward and backward, as well as, lifting and lowering the robotic arm on the EV3 robot)
1) Introduction with Sensabot (3 Questions)
2) Robot Config SKIP THIS SECTION
3) Steering Forward (3 Questions)
A1: {Video} Create and run the program MovingForward (robot moves forward 3 rotations)
A2: Mini Challenge 1 Modify the program MovingForward to drive a certain distance (Ask Mr. Merrill to select your distance)
A3: Try It! 1 Brake vs. Coast Modify the program MovingForward with coast enabled. Look for the description on the Carnegie Mellon website:
4) Arm Control (6 Questions)
A1: {Video} Create and run the program ArmControl (Robot will lift arm one quarter of a turn upward .25)
A2: {Video} Modify and run the program ArmControl (robot arm moves upward .25 & downward .25)
A3: Modify and run the program ArmControlVR on the virtual brick using the Arm Control Challenge (robot arm moves upward .25 & downward .25). You may need to review the video from Virtual Robots 5 to operate the EV3 arm in the virtual world. You can use the code below to complete the activity
Be Sure That You Are Connected To The Virtual Brick
A4: Try It! 1 Create and run the program Backward (program robot to go backward using negative power)
A5: Mini Challenge 1: Create and run the program CargoRetrieval Cargo Retrieval (Ask Mr. Merrill to select your distance)
A6: Getting Program Stuck Modify and run the program CargoRetrieval (Follow directions to use robot arm to show a stuck program). You will find the directions by looking for the title below on the Moving Straight 4 Arm Control page:
A7: Modify and run the program ArmControlSec with seconds instead of rotations (Arm will go up and down)
Mr. Merrill Pro Tip: When you are using the EV3 robotic arm it is much better to use seconds instead of rotations because the arm can get stuck as you learned in Activity 7. If you use seconds instead of rotations, the robotic arm will not get stuck! Here are my recommendations for using the robotic arm:
First Change Rotations to Seconds
Physical Robot (Raises arm so it is straight up and then lowers it)
5) Moving Forward Review Skip This Section
6) Sensabot Challenge
A1: Create and run the program SensabotChallenge on the virtual brick using either the Sensabot Challenge or Sensabot Classic. You may need to review the video from Virtual Robots 5 to operate the EV3 arm in the virtual world. Also remember Mr. Merrill's Pro Tip)
A2: Modify and run the program SensabotChallenge on the physical robot (Ask Mr. Merrill to select your Sensabot Challenge distances)
Turning (Objective: Students will learn to program the EV3 robot to turn using turn in place and tank moves)
1) Introduction with Crop Tractor (3 Questions)
2) Robot Config. SKIP THIS SECTION
3) Turning in Place (4 Questions
A1: {Video} Create and run the program TurnRight (robot turns to the right 1 rotation 100% steering)
A2: Mini Challenge 1: Create and run the program 90DegRight (Robot turns 90 degrees to the right at most 25% power)
The steering must be at 100 to pass this activity!!!
A3: Try It! 1 Create and run the program 90DegLeft (Robot turns 90 degree to the left at most 25% power)
The steering must be at 100 to pass this activity!!!
4) Other Turns (2 Questions)
A1: {Video} Create and run the program TankMove (robot performs tank move)
A2: Mini Challenge 1: Create and run the program DizzyDrill (Ask Mr. Merrill to select your distance) You may not use a Move Tank block!
5) Turning Review Skip This Section
6) Orchard Challenge
A1: Create and run the program OrchardChallenge on the virtual brick. Use Orchard Classic 2.0 when selecting the challenge on the virtual brick. You can set the power on your move steering blocks to 100 when you use the virtual brick. It will lessen the wait time on this challenge!
Bonus: My Blocks SKIP THIS SECTION
Behaviors (Sensors)
Moving Until Touch (Objective: Students will learn to program the touch sensor on the EV3 robot)
1) Introduction (2 Questions)
2) Robot Config SKIP THIS SECTION
3) Wait For Touch (2 Questions)
A1: {Video} Create and run the program WaitTouch (Robot waits until touch sensor is touched to move forward)
A2: Try It! 1- Run the program WaitTouch again(Press the touch sensor and hold before running the program above)
A3: Try It! 2- Create and run the program WaitButton (Robot waits until middle button is pushed to move forward)
4) Forward Until Touch (2 Questions)
A1: {Video} Create and run the program FowardTouch (Robot moves forward until touch sensor pressed)
A2: Try It! 1- Create and run the program ForwardRelease (Hold the touch sensor with your finger to move forward and release to stop)
A3: Mini Challenge 1- Create and run the program Vacuum (Ask Mr. Merrill where to run this challenge)
5) Touch Sensor Review Skip This Section
6) Arm Position Challenge
A1: Create and run the program ArmPositionChallenge (Ask Mr. Merrill to move the touch sensor to the arm and to select your distance)
There are two really important parts to this challenge:
Pressing the UP menu button to begin the program (You can find this as Activity 3 in Move Until Touch 3)
The robot does not move until the touch sensor is activated. The hint below will help.
HINT
Move Until Near (Objective: Students will learn to program the ultrasonic sensors on the EV3 robot)
1) Introduction to Hexarotor (1 Question)
2) Robot Config SKIP THIS SECTION
3) Wait For Near (2 Questions)
A1: {Video} Create and run the program UltrasonicHello (Wave hand in front of sensor < 50cm and it says, “Hello”)
A2: Mini Challenge 1- Threshold Value (Modify the program above to create two programs, Hello10 and Hello100, that says “Hello” when an object is less than 10 cm and less than 100 cm from the robot). Ask Mr. Merrill to help you complete this activity once you have your programs completed.
A3: Try It! 1- Create and run MissingObject (Place an object less than 50 cm and take away, then robot says, “Hello”)
A4: Try It! 2- Create and run the program ObjectDetected (Place an object less than 50 cm and robot says, “Object Detected”)
A5: Try It! 3- Create and run the program SensorChange (Place an object in front of the robot and move it 5 cm closer and farther and robot says, “Hello”)
4) Forward Until Near (1 Question)
A1: {Video} Create and run the program ForwardNear Robot moves forward and stops 50 cm from a wall. (Ask Mr. Merrill to show you where to run this challenge)
A2: Mini Challenge 1- Create and run the program BackwardFar Robot moves backward from a wall until it is 30cm away. (Ask Mr. Merrill to show you where to run this challenge)
5) Ultrasonic Sensor Review Skip This Section
6) Maze Challenge
A1: Create and run the program MazeChallenge on the virtual brick. Be sure to use Maze challenge classic, when selecting the challenge to use on the virtual brick. There are actually two different mazes to complete. The maze will randomly change to ensure that you are using the ultrasonic sensor.
A2: Modify and run the program MazeChallenge on the physical robot (Robot negotiates maze and ends up in box at the end).
Turn For Angle (Objective: Students will learn to program the ultrasonic sensors on the EV3 robot)
1) Introduction to Golf Course Mower (3 Questions)
2) Robot Config SKIP THIS SECTION
3) Turn For Angle Part 1 (2 Questions)
A1: Ask Mr. Merrill about turning on your robot during Gyro lesson
A2: {Video} Create and run the program GyroTurn (Robot turns to the right slightly more than 90 degrees)
4) Turn For Angle Part 2 (3 Questions)
A1: {Video} Create and run the program GyroRight (Change angle and speed to compensate and turn 90 degrees right at 25% power)
A2: Try It! 1- Create and run the program GyroLeft (Change angle and speed to compensate and turn 90 degrees left at 25% power)
A3: Mini Challenge 1- Create and run the program SquareBox on the virtual brick (Be sure to use the RVW Gyro block set to change angle. You can review the Virtual Robots 5 video, if you need a refresher)
A4: Mini Challenge 1- Modify the program SquareBox on the physical robot. (Robot uses gyro sensor to move around a VEX cube)
5) Gyro Sensor Review Skip This Section
6) Mower Challenge
A1: Create and run the program MowerChallenge Virtual Brick Only. You can use either of the challenges on the virtual brick.
Move Until Color (Objective: Students will learn to program the color sensor on the EV3 robot)
1) Introduction to Autonomous Vehicle (2 Questions)
2) Robot Config SKIP THIS SECTION
3) Wait For Green (2 Questions)
A1: {Video} Create and run the program WaitGreen (Robot moves forward 1 rotation after sensing green)
A2: Try It! 1- Create and run the program NoColor (Robot waits while there is a color and moves when there is no color)
A3: Try It! 2- Port View: Color Sensor Values (Use port view to display color values of colors from the Lego cube)
A4: Mini Challenge 1- Create and run the program RailroadCrossing (Robot waits on red until it is taken away, then moves forward)
4) Forward Until Red (1 Question)
A1: {Video} Create and run the program ForwardRed (Robot moves forward until sensing color red)
A2: Mini Challenge 1- Create and run the program ForwardtoLine (Robot moves forward until sensing colored line. Ask Mr. Merrill to show you the color you will be using and face the color sensor downward)
5) Color Sensor Review Skip This Section
6) Traffic Signal Challenge
A1: Create and run the program TrafficChallenge.ev3 on the Virtual Brick (Be sure to change the robot to color sensor facing forward!). You can use either challenge on the virtual brick.
Click the ROBOTS button on the main page of the virtual brick Select the EV3- Color Front
A2: Physical Robot (Robot will stop on red and go on green for 3 separate traffic lights. Ask Mr. Merrill to show you what needs to be done)
Gyro Investigation SKIP THIS SECTION
Behaviors (Decisions)
Loops
1) Introduction to Container Handling Robot (1 Question)
2) Robot Config SKIP THIS SECTION
3) Looped Movement (2 Questions)
A1: {Video} Create and run the program MoveLoop (Robot will move back and forth for one rotation infinitely)
A2: Mini Challenge 1- Create and run the program SquareLap1 (Robot will move around a VEX cube infinitely)
4) Loop With Count Control (3 Questions)
A1: {Video} Create and run the program MoveLoopCount (Robot will move back and forth 5 times using loops)
A2: Try It! 1- Create and run the program MoveLoopCount2 (Robot will move back and forth 2 times)
A3: Mini Challenge 1- Create and run the program SquareLap2 (Robot will move around a VEX cube only once using loops. The loop count must be 4)
5) Loop With Sensor Control (3 Questions)
A1: {Video} Create and run the program MoveLoopUltrasonic (Robot moves forward and back infinitely until an object is placed in front of sensor. Robot will continue to go back and stop)
A2: Try It! 1- Create and run the program MoveLoopTouch (Robot moves forward and back infinitely until touch sensor is activated)
A3: Mini Challenge 1- Create and run the program SquareLap3 (Robot will move around a VEX cube until an object is placed in front of robot. The robot will then stop)
6) Loop Review Skip This Section
7) Container Handling Challenge
A1: Create and run the program ContainerChallenge (Robot will retrieve 3 cubes placed at random distances and place them in the square behind the robot) You must use the gyro sensor for your turns!
Switches
1) Introduction to Strawberry Plant Sorter (1 Question)
2) Robot Config SKIP THIS SECTION
3) Move If Clear (2 Questions)
A1: {Video} Create and run the program MoveIfClear (Robot turns right about 90 degrees, if object in front. Moves forward 3 rotations, if clear)
A2: Mini Challenge 1- Create and run the program ColorCompare (Robot turns right for red or green and left for any other color)
A3: Mini Challenge 2- Create and run the program ColorName (Robot senses color and says name of each color on the color cube: Red, Blue, Green, & Yellow)
4) Looped Decision (2 Questions)
A1: {Video} Create and run the program MazeRunner (Robot moves right if an object is front and straight if no object in a loop. Do not use three rotations to move forward. Change it to one rotation. Also use 30cm for the threshold value and not 50cm
A2: Try It 1! - Modify the program MazeRunner and run on the Virtual Brick using Try It: Switches (Robot negotiates the maze. Be sure to adjust rotations for moving forward to 0.5) The robot will make only right turns to solve the maze.
A3: Mini Challenge 1- Modify the program MazeRunner (Robot says “Right” or “Forward”. Program should end after 10 actions)
5) Switch Review Skip This Section
6) Strawberry Plant Challenge
A1: Create and run the program StrawberryChallenge on the virtual brick using Strawberry Plant Challenge. Be sure to switch the EV3 to Color Front. Remember your lessons learned on the Container Challenge. Be sure to slow down your robot. Your program must be repeatable so I will ask you to run it successfully twice in a row. You must use the gyro sensor for your turns!
HINT: Be sure to set the ultrasonic to 6 cm when driving to the flags. This will make sure that you can see the correct color of the flag. Also be sure to read the color of the flag before using the arm to capture it. The robot will pull the flag in closer to the robot and will be unable to see the color of the flag.
Switch Loops
1) Introduction to Autonomous Tracker (1 Question)
2) Robot Config SKIP THIS SECTION
3) Obstacle Detection Failures (3 Questions)
A1: {Video} Create and run the program Obstacle Attempt1 (Robot will move 4 rotations through an obstacle)
A2: {Video} Create and run the program ObstacleAttempt2 (Robot will stop but continue to move forever)
4) Obstacle Detection (3 Questions)
A1: {Video} Create and run the program ObstacleAttempt3 (Robot moves forward until an object is detected and/or 4 rotations)
A2: Mini Challenge 1- Create and run the program ObstacleLine (Robot moves until object is detected and/or a black line. The loop mode must be set to color sensor. Ask Mr. Merrill to place the color sensor facing down)
5) Switch Loop Review Skip This Section
6) Obstacle Orchard Challenge
A1: Create and run the program OrchardChallenge2. You will be using Obstacle Orchard Challenge 2.0 on the virtual brick for this challenge. Be sure that you are using ports B or C for measuring rotations!
Line Follower
1) Introduction to Automated Material Transport System (2 Questions)
A1: Robot Configuration (Ask Mr. Merrill to modify your robot so that the color sensor is facing downward)
2) Challenge (3 Questions)
A1: {Video} Create and run the program LineTrack (Robot will track a black line infinitely)
A2: Mini Challenge- Create and run the program LineTrack4 (Robot will track line for 4 rotations)
A3: Challenge- Create and run the program LineCrateChallenge on the virtual brick(Pick up crate from pick up zone and follow black line to drop off zone to drop off crate. THE ROBOT MAY NOT LEAVE THE LINE AND MAY NOT GO DOWN THE DEAD END PATH. Also you can only use one switch loop to complete the Challenge. Be sure to use Line Tracking Challenge when selecting the challenge on the virtual brick)
Final Challenge Resources
1) Flowcharts (2 Questions)
2) Iterative Design (1 Question)
3) Project Planning (3 Questions)
4) Engineering Process (2 Questions)
Final Challenge
1) Search and Rescue Challenge (You must use the gyro for all turns!)
A1: Program 1- Fire Room (Use Try It! Search and Rescue on the Virtual Brick. For the Fire Room select Point B. Here are the actions the robot must make:
Robot detects fire
Robot backs over it to put out the fire
Robot detects that the fire is extinguished
Robot exits the fire room and enters the next room
A2: Program 2- Clear Room and Fire Room in one program (Use Try It! Search and Rescue on the Virtual Brick. For the Fire Room select Point B and for the Clear Room select Point A. Your program must use a switch and work for both rooms! Do not use a loop.)
Robot detects that fire is not in the room
Robot plays the sound “analyze”
Robot exits the room and enters the next room
OR
Robot detects fire and follows the program from Activity 1
A3: Program 2- Rescue Room (Use Try It! Search and Rescue on the Virtual Brick. For the Rescue Room select Point C)
Robot detects the survivor
Robot uses arm to lift the survivor
Robot exits the rescue room and enters the next room
A4: Program 3- Walled Room and Rescue Room in one program (Use Try It! Search and Rescue on the Virtual Brick. For the Rescue Room select Point C and for the Walled Room select Point D) Your Program must use a switch to know the difference between each room! Do not use a loop.
Robot detects collapsed wall
Robot drives around obstacle
Robot exits the room and enters the next room
OR
Robot detects the survivor and follows the program from Activity 3
A5: Virtual Robot Final Challenge (Combine activity #2 and Activity #4 to complete this challenge) Use either Search and Rescue Challenges on the Virtual Brick. Be sure to use 25% power for your turns to make them more accurate. Program must use a loop to complete all of the rooms!
1) Introduction to Pipeline Explorer
A1: Watch Video
2) Robot Config
A1: Show Mr. Merrill that your color sensor is facing downwards
A2: Delete all programs from the robot
A3: Show Mr. Merrill that the name of your robot is the same as your kit number
3) Random Move
A1: {Video} RandomMove (Robot moves at random speed between 1 to 100)
A2: Mini Challenge 1 (Robot moves a random distance from 1 to 5 rotations)
4) Wall Distance Value
A1: {Video} WallDistanceValue (Robot distance from a wall determines speed)
A2: {Video} Same program within a loop block (Robot will slow as it approaches the wall)
A3: Try It! 1- Looping For Rotations (Robot will have a set power for each 3 rotations. Set the loop to 3)
A4: Try It! 2- Big Delay (Robot will move according to the distance of your hand in front of the robot)
A5: Mini Challenge 1- Dangerous Wall (Robot will play a sound and turn to the right as it approaches the wall)
5) Displaying Data
A1: {Video} Show the word “Hello” on the EV3 display
A2: {Video} RotationDisplay (Display rotations of Motor B within a loop)
A3: Try It! 1- Display Touch Sensor (Robot displays a 1 or 0)
A4: Try It! 2- Display Color Sensor (Robot displays color number from cube)
A5: Try It! 3- Display Position (Display any text in the center of the EV3 screen)
A6: Mini Challenge 1- Multiple Display (Robot displays rotation of motor B, Motor C, and Ultrasonic distance
This block is important to use for displaying data: