1. Lesson 1 - Moving like a Yo-Yo

Introduction

Today, you will get to know your classmates and your teacher, learn how the lessons are conducted, construct your first robot, and learn how to program it to move. The end goal of this lesson is to make the robot move like a Yo-Yo. How does a Yo-Yo move?

content picture

If you have ever owned a Yo-Yo, you know that it's meant to fall down and rise back up to your hand. But in order for it to move successfully, we need to move our arm in such a way that we provide it with the required velocity. Otherwise, it will decrease the distance on the way back up on each drop until it stops.

Try to make a good impression on the rest of your class, because you will be doing this course with them until the end.

Construction

Today, you will construct a very simple robot with two tires. Before that, however, you should become acquainted with the workflow we expect you to follow. Here, it's important to not only follow instructions but work with your partner as well. It is important to us that you develop teamwork skills.

Following instructions and building your robot

We will build the EasyBot quick robot and will explain how to follow building instructions.

In order to build the robot, you need to follow the instructions in the materials section.
 

How to follow a 3D material

On each step you will see a list of the required parts in the top left corner You will be given the length of the elements and the number of identical parts you will need.
In the middle of the screen you will see how to attach the parts one to another.

Sometimes there will be no parts shown in the top left corner. Then you will just have to turn the robot into a new position.
Usually, the first and the final step show the assembled robot.

 

Make sure that parts in your hands are always oriented in the same way as those on the page!
 

How to manage the image

Use the keyboard arrow keys to move to the next or previous step.
You can use the left mouse button to roll the construction so that you can examine it.
You can use the right mouse button to move the construction to the left or right.
You can use the scroll wheel to zoom out and zoom in the image.
Below the instructions you can find the "Autorotate", button which disables the automatic rotation of the camera. You can experiment when it is better to keep this option disabled or enabled. The default setting of the option is enabled.

Up until now, you haven't built a robot. And now you have to build your first robot with another person as well!

How to build a robot when working in pairs

Most probably, you haven't built a robot before. So not only will you build a robot for the first time, but you will also have to work with another student. To make those first steps as smooth and pleasant as possible, we will point out some key points in the process of constructing a robot in pairs.

How to construct a robot in pairs

The robot should be constructed on the transparent lid of the box. The lid should be placed on your work desk in front of the computer. That way, the robot will be in a place convenient for both of you. Moreover, the lid will stop parts from falling on the floor or spreading over the whole desk.

content picture


To be fair, you should take turns every few steps. One should construct, and the other should pass the necessary parts. It will be best if you change your roles every 10 to 20 steps. Changing the roles every five steps will be too often while changing them in the middle of the instructions will be too far in time, and the one passing the parts will get bored.


Tell your teacher which one of you will initially be Building and which one of you will be Passing parts.


Try not to compete with the other pairs in the room while constructing. Being fast is not important, only how precisely you follow the instructions so that you have successfully built your robot.

Precautions when building LEGO robots from PDF instructions

There are a few things that you should be careful about when building from instructions .

Position of the brick

Pay attention to the position of the brick. The display should be looking toward you.
The display is important when choosing and starting programs, and the side of the ports is important for choosing the optimal cable length and route.

Pay attention to parts orientation

L-shaped beams could be mistakenly put in a mirrored position.
Pins could also be put on the left or on the right side of a beam, and that makes a difference. 

Pay attention to the size of parts and their positioning

Pay attention to the length of parts - 7 axle vs 5 axle.
Also, pay attention to the position of the pieces - which side of a pin goes to which hole on a beam.

In a nutshell

Always make sure that what you have built in each step looks exactly like the picture you see in the instructions.

EasyBotEV3 - simplest

The very first robot that we usually build in a class. 

After building the robot, close the box to keep the desk clear.

  1. Gather all the parts from the desk and put them back in the box.
  2. Close the box and move it aside so it's out of your way.

Programming

Common problems with motors not working

We will cover the typical reasons why your robot is not moving at all.

Wrong port

By default your motors must be connected to ports B and C. So if your robot is not moving, the first place you must look at is the ports. Do the cable connections correspond to the ports selected on the move block in the programming software?

 

Cable is not reliably connected

You must push the cable up until a "click" sound is heard. So, if the ports are correct, check the cable connections in the ports.

A way to demonstrate to someone that the cable is not reliably connected is to shake the robot and the cable will come out of the port.

Task: what happens when a cable is disconnected from the motor or the brick?

Unplug one of the cables and observe what the robot does.

Unplug one of the cables and observe the behavior of the robot. Pay attention to what the motors do when you start a simple program to move forward.

Let’s change the program

How to change the program of the robot? And how to transfer the changes we are making to the robot’s behavior?

Make some changes

We already have a program for a forward movement.
But we want the robot to move further.

 

Let’s change the program

We already remember what we have to change – we have to increase the number of rotations.

 

Let’s run the robot

After we have made the change, it’s time to run the robot. Well, the robot does not move further enough yet! Why?

 

We have to load the changes to the robot!

It turns out that the computer and the robot do not communicate all the time. We have to connect the robot to the computer and load the program again in order to receive the changes and the new instructions.

How to abort a running program which is too long or wrong

When and how to abort a running program?

Starting direction of the robot

Robots should be started to go forward. "Forward" depends on the programmed direction and means that when we run the program, the robot should start moving away from us.
 

Wrong run

If we run a program that makes the robot move towards us, we should lift the robot and stop the program.
 

How to stop а program

You can stop a program by shortly pressing the button on the left, under the screen.
 

How to abort a long program or the program of a robot which has diverted

Sometimes you may have to abort a program that has made a mistake as a result of which the robot got lost or started hitting against objects.

Move backward by using the power settings of the Mindstorms EV3-G software steering block

We will demonstrate an alternative way to make the robot move backward

The power option

The second option in the Move Steering block regulates the power of the motor. It is measured in percent and could be from -100% to +100%. A hundred percent means to use the maximum power that the motor is able to provide. Zero power means that the motor does not move at all. Negative power means a backward movement.
 

Default positive direction of a motor

It is important to know what the default turning direction of a motor is when constructing a robot and when planning the usage of a construction.

content picture

It is easy to remember - do you see the small appendix to the motor next to the rotating end? Use it as a starting point and make a circle in the air around the motor. This is your positive direction of a large motor.

 

Introduction to the Yo-Yo challenge

The challenge is to make the robot move back and forth with ever decreasing distance.

In order to do this, you must know how to use many programming blocks in one program. You must also know a few things about the motors as well. Finally, you must learn more about the settings of the Move block.

For about 5 minutes

Try the yo-yo yourself for no more than five minutes.

You are not expected to solve it in just five minutes. Simply try your hand with the task and see where the challenging part is. Experiment with the software.

Then return to the course and watch the rest of the videos where we have your problems covered.

Every program is comprised of a series of instructions

Let's make a program that moves the robot forward and then backward.

A program as a series of instructions

Drag and drop a second block to the programming canvas of the software. You can add new blocks either before, or after existing blocks.
A computer program is a series of instructions or commands that are executed one after the other.


How to delete a wrong block

If you need to remove a block, you could drag it back to the palette section and drop it there. The delete button will do the same if you prefer to use the keyboard.

Best practices for creating long programs by trial and error

Now that you have tried and solved a challenge involving a series of instructions, we would like to share a few best practices.

Try blocks one by one

It is a bad practice to place several blocks before testing your program. The problem is that when there is an error, you can't pinpoint which block causes the problem.
 

Understand the challenge

To solve a task correctly, you must understand what is expected from you. So, you should articulate how you understood the challenge and ask your teacher if that understanding is correct.
You can also ask us in the comments section below.
 

Test each step of the program with the robot

This is the most important message we have here! Follow this algorithm:

  • Place one or two blocks in your program and adjust them;
  • Download the program from the computer to the robot;
  • Place the robot on the floor and place it at the marked starting position;
  • Select the program from the brick menu and start it;
  • Observe the results and assess if the robot behaves as desired:
    • If the robot's behavior is "correct" as desired, carry on.
      • Add new blocks to the program to extend it.
    • If there is an error, it is in the new blocks you just added.
      • Correct the error and test it again.
         

Use the download option of the software

Thus, you can control where and when you start the robot. If necessary, you can start the program from the brick several times.

Tasks for the yo-yo challenge

Specific challenge on programming the robot to move as a Yo-Yo

The challenge

Program the robot to move six times:

  •  a great distance forward and backward;
  •  then some smaller distance forward and backward;
  •  and finally a very small distance forward and backward.

Possible settings

Choose the distances on your own and according to the space you have available.
The easiest numbers could be 3, 2, 1 rotations, but feel free to be creative and choose your own values.

 

Extra task: yoyo started together

A fun relief task.

  • Start all robots in the classroom simultaneously.
  • Make sure there is enough space between robots so that any accidental deviation from the straight line will not result in hitting nearby robots.
  • Film the robots and their version of a Mexican wave.

Tasks to finish a class

  1. Take pictures and make videos of your robots
  2. Disassemble and arrange the robot
  3. Arrange your workplace
    • It is important to arrange the electronics of the robots on the cover of the box.
    • Wind up the programming cable so that it is assembled.
    • Put the robot cables next to the electronics.
    • Wind up the mouse cable around the mouse.
    • Wind up the cable of the laptop charger in a way that your teacher will show you.
    • When you turn off the computer, leave it next to the robot box.
  4. Turn off all programs on your computer
  5. Exit FLLCasts  
  6. Shut down your computer
  7. Put your chair under the desk.