Using A "Computer" To Program Your EV3

In the previous assignment, you learned how to manually code the EV3 to work its way through a maze using all the sensors. Now, you will learn how to code your EV3 using the your Computer.

1. Install/Open "Lego Mindstorms Education EV3"

Contact IT and they will install the App. on your computers.

2. Learning to Program (Gradesheet)

Tutorials: The following tutorials will provide you with the Code for the programs you will write later. For each of the tutorials below, go to card #3, view the code and guess what will occur and then run the program to see if you were correct. Then have your partner initial your Gradesheet. Note: Do not spend more than a minute or two on any of the tutorials!

How to Run The Programs:

  • Connect your robot with the provided usb cable to your computer.
  • Each program will have a White Arrow in a Blue Circle' in the bottom right corner of the screen...click it! It will allow the program on the screen to 'download' and 'play' on your robot. Read the program...if it says 'Left" 'Center" or "Right" button needs to be pressed to start the program...then push the corresponding button to get the robot going.
  • Note: Currently you only see a few CodeBlocks. If you would like access to all of the CodeBlocks, then select "All CODEBLOCKS" in the bottom left corner of the screen.
  1. Select "Unit Plans" (gold button). Find "Robot Trainer." - "Download" is covering it. Select it! The "Robot Trainer" Home Page will appear. Scroll down the page and do the following tutorials:
    • Moves & Turns (Motion)
      • Go to Card #3: Guess what the program will do. Second, download it and run it...were you correct?
    • Objects and Obstacles (Ultrasonic Sensor)
      • Go to Card #3: First, guess what the program will do. Second, download it and run it...were you correct?
    • Grab and Release (Lower Arm Over Cube)
    • Color and Lines (Color Sensor) & Example of If/Then/Else
      • Go to Card #3: First, guess what the program will do. Second, download it and run it...were you correct?
    • Angles and Patterns (Gyro)
      • Go to Card #3: First, guess what the program will do. Second, download it and run it...were you correct?

 

3. Begin Programming.

  • Open the "EV3 Classroom App."
  • Connect your robot to the computer with the usb cable.
  • Turn on your robot. Notice the "Connect" icon on the computer program screen just turned from red to green.      
  • Select "New Project +".
    •  Notice on the App Screen:
      •  The Title - (you should rename it.) 
      •  The Download Button - sends your program to the robot.
      •  The Play Button.

Take a moment to scroll through two sections of codes being offered to you: "Motors"(blue) & "Movement"(pink). Notice all the possibilities that are being offered to you.
Note: Because of the variety of code being offered to you, it will allow you to be very creative when you program your robot. In other words, there won't be just one way for you to reach an outcome but several ways.

Now, time to begin programming your robot. Before I have you engage in any large projects, you will recreate the same programs you did Manually,  but now you will do it with your Computer
In order to run your program on the robot, just click on the play button to start and then the red square to stop. You can also download it directly to your robot and activate it from the robot.

Note: The programs you create for "Touch Sensor", "Ultrasonic Sensor", and Color Sensor," must have If/Then/Else Statements!

 1. Program Motion 

  • Program your EV3 to successfully drive forward 3 second. Turn Around and Drive back to start.
    ((Mobile) (YouTube)
 

6. Gyro Sensor 

  •  The EV3 moved forward for a few seconds and then turned 45 degrees and moved forward for another few seconds. (Mobile) (YouTube)
    (Just add the the Gyro Sensor to any one of the programs you wrote above, show me the turn and I will sign off on it!)

5. Create Front Arm Lift

  •  The EV3’s front arm lift closed down over the cube and then dragged it backwards for a few seconds. 
    (Mobile) (YouTube)
The Following Programs Must Use "If/Then Statements".  

 2. Program the Touch Sensor 

  • Program your EV3 so that it will drive forward, but when trigger is touched, it will turn right for 2 seconds then continue to drive straight once again . (Mobile) (YouTube)
    (The program you create for the Touch Sensor must contain an If/Then/Else statement)

 3. Ultrasonic Sensor 

  • The EV3 moved forward and stopped when its ultrasonic sensor came within 30 cm. of the cube. (Mobile) (YouTube)
    (The program you create for the Ultrasonic Sensor must contain an If/Then/Else statement)

 4. Color Sensor  

  • 6a. Color Stop: The EV3’s came to a stop when the color sensor crossed a color line.(Mobile) (YouTube)
  • 6b. Color Go: The EV3 moved for a few seconds when the blue portion of the cube was placed in front of the color sensor. (Mobile) (YouTube)
    (The program you create for the Color Sensor" must contain an If/Then/Else statement)

 Congratulations...You Are Done! Get Your Points  and Move onto Programming..."Parking Lot!"