The whole process consists of two stages: assembly and programming. To collect good robot knowledge of mechanics is required. To program a robot for certain actions, you need to know a language that will understand motherboard or program block. School knowledge in computer science is not enough here.

Where to get material?

First you need to decide how you want to assemble the robot: from ready-made kits or select materials yourself. The advantage of the kit is that you don't have to look for the parts individually. Most often, several devices can be assembled from one set.

A structure that is not assembled from a ready-made set is called open system. It also has its advantages: your robot will be an individual, and you yourself will be able to improve the design. But you will definitely spend more time and effort.

What is the robot made of?

Housing - metal or plastic "body", to which the rest of the parts are attached. Each robot has a source of energy - batteries or an accumulator. Depending on what task the robot will perform, sensors are chosen: they can detect color and light, and respond to touch.

To make the robot move, you need motors. "Head" of the whole mechanism - the motherboard or the program block. With their help, the robot connects to the computer and receives a set of tasks.

How to make him do something?

In order for the robot to perform some action, you need to create computer program. The complexity of this step depends on the assembly. If the robot is assembled from a Lego Mindstorms or mBot set, then even children can handle their software.

If you are building a robot yourself, you need to learn the basics of programming and the language in which you are going to write the program, such as C ++.

Why can't the robot execute the program?

Getting to a new place, he can go astray and execute the program incorrectly. In order for the robot to do everything correctly, it is necessary to adjust the sensors. For example, lighting that is too bright can interfere with adequate color recognition. Depending on the surface on which the robot moves, the power of the motors is adjusted.

Can I learn how to assemble and program at school?

Despite the fact that robotics is not included in the school curriculum, teachers in physics and computer science can teach a child how to assemble and program. In Belgorod, some schools have circles where they make robots.

“After lessons with physics and computer science teachers, we learn to program. We already know how to work in LegoMindstorms and Robolab ( software for robots - approx. ed.). We also sometimes learn how to make 3D drawings of parts,” said students of the Belgorod Engineering Youth Boarding Lyceum and participants of RoboFest-2018 Anton Pershin and Dmitry Chernov.

Where, besides school, can one become a roboticist?

The engineering school of BelSU has a class where they teach how to assemble and program robots. In 2017, Quantorium opened in Belgorod, where schoolchildren are taught robotics from the age of nine.

To become a real roboticist, you can enter the Faculty of Robotics. There are no such people in Belgorod yet, but in BSTU im. Shukhov has a department of technical cybernetics. Her students win prizes at all-Russian competitions in robotics.

Can you learn on your own?

Yes. There are many resources on the Internet where you can learn what to build and how to program a robot.

Will the robot be useful?

It can be adapted for everyday tasks and made an assistant in the house. There are many examples on the Internet of how home inventors create robots for baking pancakes or cleaning an apartment.

How to confirm your success in creating robots?

Take part in competitions such as RoboFest. There are different nominations depending on age and direction. Basically, each type of robot has a track on which it performs tasks: capture a cube or draw a line. There are also static systems in which judges evaluate the presentation of the project and the operation of the mechanisms.

As a rule, participants come to competitions with assembled by robots and in preparation, they spend time only on calibrating sensors and adjusting the program.

The editors are grateful for the help in creating the material of the participants of RoboFest-2018 Dmitry Agafonov, Dmitry Chernov, Anton Pershin and Danila Migrina.

Natalia Malyihina

The task of the teacher is to walk this path with the student, not insuring against failures, but preventing disappointment due to possible difficulties. It is very important to organize classes in such a way that children discover new things for themselves through meaningful activities.
How does a robot help learn computer science? I will only point out a few topics of informatics on which robotics is based.
Topic "Files and file system".
The student got a LEGO®NXT microcomputer from the educational kit LEGO Mindstorms NXT Education. Control it file system occurs with standard commands, but since the amount of memory is not large, control of the necessary and unnecessary must be constantly monitored. In order to voice the actions of the robot, display a picture, replenish the library of working programs, it is necessary to operate with the basic concepts of computer science: file, file type, file path, menu, folder.
Topic "Information processes", "Information coding".
The robotic kit is equipped with sensors that register sound, tactile and video information. After digitization, the information can be displayed on the display screen. A special function of the microcomputer makes it possible to experiment with sensors, motors, using ready-to-run programs. After conducting a series of experiments with sensors, an understanding arises: why an ultrasonic distance sensor is slower than an infrared light sensor, how sound is converted into a digital code, and so on. The study of information processes and the principles of information coding gives a deeper understanding of the essence of information technology.

Theme "Communication technologies".
LEGO®NXT Microcomputer Supports Technology wireless communication. Using the Bluetooth function, you can set wireless connection between the NXT microcomputer and other devices that have a Bluetooth device, such as other NXTs, with mobile phones or with computers. By setting bluetooth connection, perhaps: download programs from a computer remotely; send programs from other devices (not from a computer), including NXT; send programs to both individual NXTs and their groups. This technology makes it possible to control the robot using a mobile phone.

Topics “Algorithms. Executor of algorithms”, “Programming environment”.
For an initial introduction to the robot, you can directly program the NXT unit without accessing a computer. Directly on the display screen, according to a template of five commands, you can compose a simple program and loop it. However, one cannot do without knowledge of basic algorithmic structures and development of the programming environment. It is the ability to program the robot that makes it a universal performer capable of solving a variety of tasks. Starting to master programming technology should be with visual programming environments, then moving on to more powerful and modern event-driven environments.
Thus, robotics requires basic knowledge of computer science, and the inexhaustible desire of the student to make his robot “the best” pushes him to master new knowledge.
Why can a robot be called an ideal learning tool? Because this tool makes it possible to create a learning environment that reclaims the natural aspirations of the child to play, create, communicate with peers. So, we can highlight the advantages of robotics as a means of education:
. The assimilation of knowledge occurs during the game.
. Robot construction offers creative freedom.
. The desire to improve their work is the majority of students.

As an example, I would like to give a model of the “Free Food Delivery Robot”, created by a 6th grade student as part of the “Programming by Robot” course in extracurricular activities. The robot is built from the LEGO MINDSTORMS NXT Education 9797 set using the standard Alfarex 1.0 model, and is completed with a color sensor to indicate the status of the robot and a treat tray.
The purpose of the work is to implement the human gait model as far as possible with the available resources. The movement of each leg is controlled by a motor and a mechanical assembly of gears and levers. One lever moves the leg up and down, the other moves it forward. In this case, the body deviates towards the supporting leg, due to which the robot maintains balance. This gait is called "shuffling"
A separate motor controls the distance sensor and the lever arms that hold the touch sensor and the color sensor. The tray for treats is fixed motionless.
The robot is programmed to perform the role of a peddler, for example, free treats, according to the following behavior algorithm. The robot accompanies its movement in a straight line with the phrase: “I am an Alpharex robot, I treat you for free!” A person wishing to make contact with the robot can stop it with a gesture. After stopping, the robot says the phrase: "Help yourself and press the button!". Taking a candy, a person as a token of gratitude must press the button once. Three seconds after stopping, the robot will continue its movement. When the treats are over (the robot is programmed for a specific amount of sweets on the tray), the robot will say goodbye, the red indicator will light up, the robot will stop.

The program for controlling the robot was written in the NXT Programming 2.0 environment.

Performer Robot exists in a rectangular field, divided into cells, between which there can be walls and fits entirely in one cell. The robot can move around the field, paint over cells, measure temperature and radiation. The robot cannot pass through walls, but it can check if there is a wall next to it.

The command system of the "Robot" performer includes:

  • 5 commands that cause Robot actions (left, right, up, down, paint over)
  • 10 condition checking commands:
  • 8 commands like [left/right/bottom/top] [wall/free]
  • 2 commands like cage [shaded/clean]
  • 2 measurement commands (temperature, radiation)

action-commands

Check Commands

Team Description
log left free Returns yes if the robot can move to the left, otherwise no.
log on the right is free Returns yes if the robot can move to the right, otherwise no.
log top free Returns yes if the robot can move up, otherwise no.
log below freely Returns yes if the robot can go down, otherwise no.
log left wall Returns yes if there is a wall to the left of the robot, otherwise no.
log right wall Returns yes if there is a wall to the right of the robot, otherwise no.
log top wall Returns yes if there is a wall above the robot, otherwise no.
log bottom wall Returns yes if there is a wall below the robot, otherwise no.
log cell is shaded Returns yes if the cell is filled, and no if the cell is not filled.
log cell clean Returns no if the cell is filled, and yes if the cell is not filled.

Measurement Commands

Let it be required to transfer from the cell to the left of the wall to the cell to the right of the wall:

The algorithm might look like this:

use robot
alg example 1
early
. way down
. right
. up
con

If you try to lead the Robot through the wall, then a failure will occur. The robot will crash into the wall and will no longer be able to follow commands further.


Let's write an algorithm for the robot to pass the maze from point A to B:

use robot
alg from A to B
early
. right

. up ; up ; right ; way down ; way down ; right
. up ; up ; right ; way down ; way down ; right
con

The commands for passing each section can be grouped into one line - this shortens the record of the algorithm and makes it more understandable. In order to write commands on one line, they must be separated by a semicolon.

They learned to set it for further work. Now let's go directly to compiling algorithms for the Robot using simple commands.

If you prefer information in the format of video tutorials, then the site has a video tutorial

Any performer must have a command system ( SKIexecutor's command system). Executor command system- the set of all commands that the performer can execute. As an example, consider a trained dog. She knows how to execute some commands - “Sit”, “Lie down”, “Next”, etc. This is her command system.

Simple Robot Commands

Our Robot also has a command system. Today we will look at simple robot commands. There are 5 in total:

  • up
  • to the left
  • right
  • paint over

The result of executing these commands is clear from their name:

  1. up— move the Robot one cell up
  2. way down— move the Robot one cell down
  3. to the left— move the Robot one cell to the left
  4. right— move the Robot one cell to the right
  5. paint over— paint over the current cell (the cell in which the Robot is located).

These commands can be written from the keyboard, or you can use hot keys (by pressing them, the commands will be inserted automatically):

  • up - Escape, Up (up arrow)
  • down - Escape, Down (down arrow)
  • left - Escape, Left (left arrow)
  • right - Escape, Right (right arrow)
  • paint over - Escape, Space (space)

Please note that you need to dial the desired combination of hot keys not in the usual way! We are used to pressing keys at the same time, but here they are needed press sequentially. For example, to enter the up command, you need to press Escape, release it, and then press the up arrow. This must be remembered.

Now we are ready to write the first algorithm for the Robot. I propose to start with a simple one - draw a square with a side of 3 cells. Go!

We launch Idol, it. Can I start writing a program? Of course not! We are not! Let's do it. I suggest using this one:

Now everything is ready. Let's start writing the program. As long as she looks like this

Delete the symbol "|" and call our algorithm "Square"

I propose to draw a square, moving clockwise. First, paint over the current cell by giving the command paint over. Then we take a step to the right and again paint over the cell. And once again step to the right and paint over.

Let's try to run the program and see what happens. Press to launch F9 or the button on the toolbar

As a result, we should see something like this

If you do not have such a Robot window, then on the toolbar click " Show Robot window” or in the Robot menu, select the item “ Show Robot window". We continue further.

Now we will move down and paint over the right side of the square:

way down

paint over

way down

paint over

Then let's go to the left, painting the bottom border of the square

to the left

paint over

to the left

paint over

We have one unpainted cell left. Let's paint over it

up

paint over

All is ready! As a result, our program looks like this:

use robot

alg Square

early

paint over

right

paint over

right

paint over

way down

paint over

way down

paint over




Performer Robot Command system for the performer Robot Movement commands: up, down, left, right The robot moves one cell up, down, left, right. The command to paint over - paints over the cell in which the Robot is standing. Checking the validity of the condition: free on top, free on the bottom, free on the left, free on the right The Robot checks the truth of the condition of the absence of a wall in the cell where the Robot is located. You can use the record of compound conditions formed logical operations AND, OR, NOT.




Performer Robot Direct environment editing All environment editing commands are performed using the mouse: put/remove a wall - click on the border between cells, paint/clear the cell - click on the cell, move the Robot - drag the mouse to the desired cell.


Executor Robot Robot menu commands Show Robot field Makes the Robot monitoring window visible. Print environment Creates a file in PDF format, showing the current situation in color or black and white. Save environment to file Creates text file with a description of the situation in the internal *.fil format. This file can later be loaded as a start environment (Change start environment command) or when editing the start environment (Open start environment edit windows command). Change as start environment Sets a new start environment file name (using the standard dialog) and loads a new start environment. Return to starting environment Makes the starting environment current.


Performer Robot Image of the current situation in the observation window The image of the current situation is always completely placed in the working field of the observation window for the Robot. The background of the working field is green. The shaded cells are grey. There are thin black lines between the cells. Walls Shown as thick yellow lines. In the cell of the working field of the observation window, the Robot is depicted as a rhombus.


Performer Robot Example 1. Let's create an algorithm called "Knight's Move" to get the Robot from point A to point B (Fig. 3). The algorithm has the form (Fig. 4.). After its execution, the Robot will move to the desired point (Fig. 5). An algorithm written in the language of the performer is called a program. Fig.3Fig.4 Fig.5