3. Lesson 3 - Greet a stranger

Introduction

Today we will build a special robot - a spaceship. Nobody knows what to expect in space, that is why we need to be prepared. Our robot should be ready to meet extraterrestrials and even make friends with them!

Greet a stranger with the robot. Introduction to the task

In this lesson we will program our robot to display emotions!

Do robots have emotions?

Most of the time they don't but we will learn how to animate our robots, so that they look more 'alive'.

Construction

Although the robot today represents a spaceship, its name is Easybot. But how can it be possible to be easy and go into space!? Actually, all genius ideas are simple by themselves. That is why there is a famous saying by A. Einstein "The definition of genius is taking the complex and making it simple."

EasyBot build with LEGO Mindstorms EV3

Building instructions for the EasyBot LEGO Mindstorms robot using in many of our courses and tutorials. This EasyBot has two motors and two front wheels. The third wheel is...well, check it out, see how the third wheel is built. 

How to make the EasyBot resemble a human

This animated instruction shows you how to move the EV3 Intelligent brick into an upright position. Now, when you can add eyes and sounds to that robot for an extra animated experience! What if you added some arms to that construction?

Now, after the robot is built, close the box so that it's out of your way and the desk is clear.

  1. Collect all parts from the desk and put them back in their places in the box.
  2. Close the box and move it to the side so it's not in your way.

Programming

Now it is the time to teach the robot to communicate with humans and extraterrestrials.

How do people communicate?

In our everyday communication we use a lot of gestures apart from speaking. For instance, if you see a sad person, you can see the sadness on their face, without needing them to say a word. That is what we will try to teach our robot today!

Task: Try by yourself to make the robot make a sound

We encourage you to explore the software on your own.

Explore

Find a way to play a sound with the robot using the EV3 programming environment. Choose any sound you like.
 

Be polite

Just make sure you respect each other's patience and be quiet with the volume settings of your computer and robot.

Try to program the robot to speak

  • Find the sound block and try to play some words with the brick.

Sound block in EV3-G software. How to say "Hello" with the robot

Let's learn how to use the Sound block.

The Sound block


Find the Sound block in the green "action" pallette.
The default mode of the block is "Play file".
Choose Lego sounds from the top right corner and browse all preset sound files.
The "Hello" greeting is in the "Communication" folder.

Task: make the robot greet a stranger and leave

Explanation and demonstration of the big task for the lesson.

"Greet a stranger" challenge

The robot smiles, moves to a person or an object, says hello, and returns.
Use all the blocks that you have learned so far in a single program.

Greet a stranger and leave

Steps

  1. Smile while walking to the person:
    • first put a display block;
    • then add a move block.
  2. Greet, say "Hi".
  3. Return to the initial position.

 

Task: Don't be rude, wait a moment.

Using Display, Sound, Wait and Move blocks together.

Task

In order to be polite, you should wait for a response by the person you have just greeted.

Go to the stranger, say "hello", wait for a response, say "goodbye" and leave. Use all blocks you already know.

Try to find out how to make the robot wait for a while before leaving.

After five minutes go to the video section and see how we do it.

Wait block. Basic usage.

How to make the robot stay idle while the program is still running.

The Wait block

Go the orange Flow palette and take the second block which is the wait block. The default mode of the wait block is to wait for some time. You can set the number of seconds the robot should wait before the program continues to the next block.
You can think of the wait time block as a "pause".

 

Display block in the EV3-G software. Smiley faces, angry faces... all kinds of emotions

This is how to use the display block to show images with the EV3 software.

The display block

In the green "action" pallette, find the Display block.
By default, the mode of the block is "display file".
From the top right corner choose Lego Images and browse all preset images.
The "Big smile" image is in the "Expressions" folder.

Display block as a last block in an EV3-G software program

How can you be sure your image on the display is seen when the program ends?

"The image is in the program but I can't see it"

We hear that phrase from our new students all the time. The reason is that the display block can't be the last block in the program.
When a program running on a robot ends, the display shows the program's menu list and your image is not visible anymore.

Wait a bit to see it

Put a wait block to be able to see the image that was the last block of the program. This way we postpone the end of the program and give ourselves some time to see the image.

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.