Create and upload your first program

Starting EV3-G Software. Projects and Programs

Now we have to program the robot. The steps that we will cover are starting the software, writing a program and downloading it to the robot.

Find the EV3 icon on your desktop

The icon could be white for the educational version, or black - for the retail version of the software.

Creating a new EV3 project

In both versions, you must press the plus icon in the upper left corner of the program to start a new project.
All of your programs are organized into projects.

What is a project

Think of projects as a central store-place for all your programs related to one task/goal/context.
Initially the context is the lesson you are attending. Each lesson will have one project with a few programs that solve different tasks in the lesson.
Later on one project could store all programs for your competition robot.

Маке extra working space

After a project is opened, close the documentation pane by clicking on the black icon in the upper right corner.

Write your first program with EV3-G software

Now we will create the first program in this course and we will make the robot move forward.

Which block to use

In order to achieve the task for moving the robot on its own, we need a programming block for movement from the green Action palette.
As our robot has two motors with wheels, we should use a block that controls both motors at once.
The first two blocks of the green action palette are blocks that control single motors.
The next two are Move blocks that control two motors at once.
Here we will demonstrate the simpler block of the two - the move steering block.

Adding blocks in the program

Click once on the block in the pallette and place it next to the start block so that a grey rectangle appears. Now click again and the block will snap at position. There is no need to hold the mouse button and drag.

 

Naming programs in the EV3-G software

When we, the teachers, make programs and projects, we give them descriptive names. Let's show you a way to put cool names on your programs.

You start with a single program for every project. You can create new programs with the small Plus ("+") sign.

If a project has any unsaved changes, there will be a small asterisk (*) in the project name.

 

We communicate via programs and projects

If you need help with your robot, you can send us your program.
When we teach you, we share exemplary programs with you.

Always give names to your programs. This way you demonstrate that you care for what is happening with the robot.


The name should describe the task, usually with a verb and a noun. You can change the name of a program with a double click.

Good names for a program could be:
"grab ball",
"move forward", etc.

Never put abbreviations in the names. They mean something to you right now, but mean nothing to a stranger. They could mean nothing to you as well, say, a week later, when you've forgotten what you meant.

Demonstration at the end of the class

Create a new program for each task and save it with a descriptive name.

Every new task should be created in a new program and these programs must have descriptive names. Don't simply overwrite one program all the time.

When you have many programs in the project, you can make a demonstration of what you have done at the end of the class or record a video for us that you can share in the comments underneath this section.

Connect to the brick via bluetooth

To be able to connect the brick, it should be switched on. Use the EV3 software to check which bricks are on and choose yours. Be careful not to connect to another student's robot!

 

Load and start program from the EV3-G software

We will cover three ways to transfer your program from the computer to the robot.

Communication pane

In the lower right corner of the EV3 programming software there is the so-called communication pane.
To the very right of that pane, you see a red text EV3 and three icons shaped as an arrow, a triangle and a triangle in parentheses (round brackets).
Those three icons allow you to send the program to the robot, or in other words, to download the program to the brick.


Options to download the program to the Brick

  • Download (Vertical arrow downwards)

This is the recommended option to use. It will transfer your project and all its programs to the brick.
After the process is finished, you will hear a short sound from the brick.
Then, you must use the brick display and menus to find and start a program from the project.

  • Download and run (triangle icon, resembles play icon)

Be very careful with this one. If your robot is on a table, it might fall down and break. If used carefully, this option eliminates the need to navigate in the menus and manually start the program.
 A limitation of the usage of that option is the length of the cable and that the robot must be positioned at a safe and desired position beforehand.

  • Run selected (triangle icon in round brackets)

 All that you already know for the Download and Run option applies here as well. The difference is that the program will not start from the beginning but from any block you choose and will execute as many blocks as you have selected with the mouse, making a rectangle selection in the software. Hence, the name "Run selected blocks only".
 
 

Best practices

 Usually, students in a class should follow this process:

  • Understand the challenge;
  • Create a program with one or two blocks;
  • Connect the robot and use the Download option;
  • Find and choose the program;
  • Disconnect the robot and go to the starting position for the challenge marked on the floor;
  • Observe results and modify or extend the program (you will learn more about this in the next lesson)

 
This is why we recommend using the Download option.


An extra option to download and run

The green triangle in the very first rounded orange Start block of your program is also a button and is used to download and run that thread of the program to the robot.
Expect details about threads and how to use many threads later in the course.

Task: Create and download simple program to the robot

Step by step, how to create and run your first program.

Steps

  1. Start the EV3 programming software on your computer;
  2. Add a Move block to the first program. There is no need to modify the Move block;
  3. Start the EV3 intelligent Brick;
  4. Name your program as Movement;
  5. Connect the robot to the computer (USB or Bluetooth, depending on your classroom requirements);
  6. Download the program to the robot;
  7. Start the program on the robot.

EV3 brick menu - my projects

The most universal way to start your programs is from My Projects menu and we will cover details about that menu in the EV3 Brick.

Navigation in the menus

You choose between Recent and Project menus by using the left and right buttons. Inside the lists of programs and projects you use the up and down arrow keys to navigate and the center button to enter a project and start a program.
 

Usage of My Projects menu

There is an alphabetical list of the projects that you have downloaded in the brick.

You cannot start the whole project, you must choose a project, inside of which you will find a list of programs. Then you should choose the desired program and press the center button to start it.

You cannot delete individual programs from the brick. You must delete the whole project. If you wish to delete an unused project - press the center button and confirm the "trash can" question.