Default Ports for Lego EV3

New users often run into a problem when they program the Lego EV3 they don’t get the output they expect. Usually this is because they plugged the motor or sensor into a port and did not check if the programming block is using that port. A simple solution is to use the default Ports.

  1. Touch sensor
  2. Gyro sensor
  3. Colour sensor
  4. Ultrasonic sensor
    1.  Medium motor
    2. Left drive motor
    3. Right drive motor
    4. Large motor

      EV3 Tutorial 1 – output 

      With programming one of the first things to do is output. Many programmers start with a Hello world program where they output the word Hello world to the screen. While we could do that with our robot we will start by making it move.

      If you followed the EXPLOR3R Building Instructions you have a robot that is ready to drive. The left drive motor should be plugged into the B port on the brick and the right drive motor should be plugged into the C port.

      We will use the Lego software – at this stage you can do this with any tool. 

      Programming blocks are colour coded. The green blocks are the action blocks.  The move tank block can be dragged on to the screen. Connect it to the green arrow – it will start when you run the program.

      If you click on the block you will see options – for now we want to stick with number of rotations. The left and right wheels will be 50 (100 % is forward full speed, -100% is backwards full speed). 

      Your program is now ready – before you begin, make sure your computer is not on a table where it could fall off if it drove. You need to download the program to your robot and run it.

      Lego has great (and short) videos walking you through this process. 

      https://www.lego.com/en-us/mindstorms/learn-to-program

      Make sure you can run your program more than once. Being familiar with using the brick will make it easier.

      Pro tip: make sure to name your projects – if you have groups label your bricks and name them so each group knows what robot they are using.

      Challenge

      Run your program multiple times and set the number of rotations to a different amount each time. Graph the result – can you predict how far your robot will travel with 7 rotations – how close were you?