• Intelligent toys – programmable robots constructors

    1.1 What is LEGO® MINDSTORMS®?

    LEGO MINDSTORMS is a programmable robotics building kit that lets you create and control your own LEGO robots. The new LEGO MINDSTORMS EV3 kit contains everything you need to create any of 17 robots that walk, talk, move and do everything you want. EV3 kit includes software and free apps that let you build, program, and control robots using your PC, Mac, tablet, or smartphone.

    1.3 What is the EV3 Smart Brick?

    The EV3 Brick is a programmable intelligent module that, as the brain of the robot, controls the motors and sensors to make it move, walk, talk, and also provides wireless communication via Wi-Fi and Bluetooth.

    2.1 What's included in the LEGO® MINDSTORMS® EV3 set?

    Instructions for building your first robot, TRACK3R
    Connecting cables
    1 USB cable
    LEGO Technic parts: 594 pieces
    1 EV3 module
    2 large interactive servos
    1 medium interactive servo motor
    1 touch sensor
    1 color sensor
    1 infrared sensor
    1 infrared beacon

    2.2 Are assembly instructions available in PDF format?

    2.3 How many robots can you build with LEGO MINDSTORMS EV3 (31313)?

    Five models can be assembled at once - assembly instructions along with accompanying programs are contained in the EV3 software. In addition, there are 12 additional fan-made robots available through the EV3 Software Lobby menu or website - all 12 models can be built using parts from the LEGO® MINDSTORMS® EV3 set (31313).

    3.1 Can LEGO® MINDSTORMS® EV3 Home Edition software be used on both Macintosh and PC?

    Yes. The EV3 software can be used on both the Macintosh and PC platforms to program LEGO MINDSTORMS EV3 Bricks.

    3.3 What languages ​​is the LEGO® MINDSTORMS® EV3 Home Edition software available in?

    You can download the EV3 User Software for free from /mindstorms in the following languages:

    • Chinese (Simplified)
    • Danish
    • Dutch
    • English (USA)
    • French
    • German
    • Japanese
    • Korean
    • Russian
    • Spanish (ESSA)

    3.4 Is there a user manual for the EV3 software?

    Yes. User manual available for download at pdf format'from site/mindstorms

    3.5 What languages ​​is the EV3 Software User Guide available in?

    You can download the EV3 User Manual from website/mindstorms in the following languages:

    • Czech
    • Chinese (simplified)
    • Danish
    • Dutch
    • English (USA)
    • Estonian
    • Finnish
    • French
    • German
    • Hungarian
    • Italian
    • Japanese
    • Korean
    • Latvian
    • Lithuanian
    • Norwegian
    • Polish
    • Portuguese
    • Romanian
    • Russian
    • Slovak
    • Spanish (ESSA)
    • Swedish
    • Ukrainian

    3.6 Is it possible to program on the EV3 Brick itself?

    Yes. We continued our work and improved software application module for the LEGO® MINDSTORMS® EV3 module. You can easily program basic tasks on the EV3 Brick. All EV3 Brick programs can be loaded into the LEGO MINDSTORMS EV3 Home Edition software for further advanced programming.

    3.7 Are there tools to create my own programmable blocks for LEGO® MINDSTORMS® EV3 Home Edition software?

    Yes. For most users, this tool is called MyBlocks, and it is already built into the standard EV3 software. A software development kit is provided for people building their own hardware.

    3.8 Can I program the LEGO® MINDSTORMS® EV3 Brick using NXT software?

    No. The NXT software does not have the ability to program the EV3 Brick.

    3.9 Will there be pdf help available showing how to program the EV3 Brick and use the LEGO® MINDSTORMS® EV3 Home Edition software?

    There is a user manual in pdf format which contains brief information about the EV3 Brick Direct Programming Application and how to create a program. To help you get started with programming your EV3, there are two quick start videos in the software section.

    3.10 Is LEGO® MINDSTORMS® EV3 Home Edition software compatible with legacy NXT hardware?

    Yes. You can program the NXT Smart Brick using the new LEGO MINDSTORMS EV3 Home Edition software. The NXT module does not support all software features.

    3.11 Will LEGO® MINDSTORMS® EV3 software work on a tablet?

    Yes and no. Free app EV3 Programmer, which can be downloaded via App Store And Google Play, allows you to program robots using a tablet via Bluetooth. Compared to PC and Mac software, this application much easier to use and does not involve more complex software functions, data blocks and calculations. The EV3 Programmer app is recommended for those new to LEGO MINDSTORMS or for those who want to be able to program their robots even if they don't have a desktop PC or Mac handy. To complete the EV3 software installation, you must install the LEGO MINDSTORMS EV3 software on your PC or Mac. Currently this version software not available for tablets.

    3.12 Besides EV3 Software, what programming platforms can be used to program LEGO® MINDSTORMS® EV3 Bricks?

    Besides EV3 software, you can also use LabVIEW and RobotC. EV3 Software is an open platform and we expect the MINDSTORMS community to embrace additional languages ​​such as JAVA.

    3.13 What new features have been added to the LEGO® MINDSTORMS® EV3 Home Edition software compared to NXT?

    The EV3 software has many new features and improvements over the NXT software. Here are the most notable ones: Home page

    • New design for easy navigation through content, including access to project files for five EV3 robot heroes: TRACK3R, SPIK3R, R3PTAR, GRIPP3R and EV3RSTORM, as well as direct links to 12 bonus fan-made robots.
    Content Editor
    • Content can be edited directly within the software, allowing you to customize existing projects or create new projects from scratch.
    Closer connection between the EV3 Brick and the programming environment
    • The hardware page allows you to monitor their status and values.
    • Hardware items are automatically recognized thanks to automatic identification support.
    • Setting up Bluetooth simplified thanks to USB to Bluetooth adaptation tools.
    Debugging tools are now part of the programming environment.
    • Important information about running the program
    • Program blocks will display a warning sign if detected hardware, differs from the required one.
    • Probes allow you to see the passage of numerical values ​​along data buses.
    New features of program blocks’:
    • Simple linear programming by joining blocks (no need to use a beam anymore).
    • Block parameters are configured directly on the blocks.
    • Read the programmed sequence directly onto the blocks.
    • Enhanced sequence buses make it easier to display program structure and create parallel execution.
    • “The Wait for change function has been added, which allows you to easily create robots that act depending on the environment and do not wait for a change in the threshold value, realized by comparing measured values.
    • Data buses have been improved and a data casting function has been added to simplify data type conversion.
    • Arrays are integrated into building blocks.
    • Loop interruption is now possible, allowing for advanced state management mechanisms.

    3.14 What is the content editor in EV3 software?

    The content editor allows you to edit, adapt and customize &mdash projects - or create your own new ones from scratch. You can use the content editor to modify your projects by inserting text, images, videos, and audio.

    3.15 Will the content editor support .MOV and .AVI files?

    Content editor supports following formats files except .AVI:
    Image: JPG, PNG
    Video: MP4, ASF, WMV, MOV
    Sound: MP3, WMA

    3.16 How do I update the EV3 software?

    From "Help" to top line EV3 Software menu you can enable the function in the EV3 Software automatic check availability of updates. Once you select the Check for Software Updates option, a checkbox will appear and the EV3 Software will check for updates regularly. (This requires an Internet connection.) If there is an update available, the EV3 software will notify you. Once downloaded, you can install the update.

    4.1 What can Bluetooth connectivity be used for in the LEGO® MINDSTORMS® EV3 Brick?

    Bluetooth technology enables communication with EV3 software or communication between EV3 Bricks. For the EV3 Programmer and EV3 Commander applications to work, you must connect the tablet to the robot via Bluetooth.

    4.2 Why use a USB cable to connect the LEGO® MINDSTORMS® EV3 Brick to your computer when Bluetooth connectivity is available?

    USB connection is faster and also on some computers bluetooth module absent.

    4.3 Can LEGO® MINDSTORMS® EV3 Bricks be daisy-chained via Bluetooth?

    4.4 What is the difference between Wi-Fi and Bluetooth?

    Wi-Fi and Bluetooth serve different purposes. Bluetooth is a short-range connection between two devices. Wi-Fi is a wider range network connection, requires a Wi-Fi access point, a router, and consumes more battery power than Bluetooth.

    4.5 What does “made for iPod, iPhone and iPad” mean?

    Bluetooth communication on the EV3 Brick supports the same protocol that iOS devices use - for example, you can communicate with iPod, iPhone and iPad. (The NXT module does not have this feature.)

    5.1 What can Wi-Fi be used for with the LEGO® MINDSTORMS® EV3 Brick?

    The Wi-Fi feature can be used to communicate between the EV3 Brick and the EV3 Software. Wi-Fi adapter must be connected to the EV3 Brick's USB port. (Wi-Fi adapter is not included with the product.)

    Yes. It is recommended to use the EV3 Smart Brick as a Wi-Fi adapter wireless adapter NETGEAR N150 (WNA1100) and EDIMAX EW-7811UN adapter.

    5.3 Why use a USB cable to connect the LEGO® MINDSTORMS® EV3 Brick to your computer when Wi-Fi is available?

    USB connection is faster. The battery will last longer if the Wi-Fi connection is disabled.

    5.4 Can LEGO® MINDSTORMS® EV3 Bricks be daisy-chained via Bluetooth?

    No. When connected via a daisy chain, a USB cable is used to connect EV3 modules.

    5.5 Do I need a router?

    Yes. If you want to use Wi-Fi, you will need a router.

    5.6 Wi-Fi better than Bluetooth?

    Wi-Fi and Bluetooth serve different purposes. Bluetooth is a short-range connection between two devices. Wi-Fi is a wider range network connection and uses more battery power than Bluetooth.

    6.1 What LEGO sensors are there for LEGO® MINDSTORMS® EV3?

    LEGO MINDSTORMS EV3 (31313) includes the following sensors:

    • 1 Touch sensor
    • 1 Color sensor
    • 1 IR sensor
    • 1 IR beacon
    The sensors listed below can be additionally purchased from the online store website:
    • Gyro sensor
    • Ultrasonic sensor, as well as other third party sensors.

    6.2 How are LEGO® MINDSTORMS® EV3 sensors different from NXT sensors?

    LEGO MINDSTORMS EV3 sensors are all-new sensors that feature improved interface, performance, and greater accuracy than NXT sensors.

    • The EV3 color sensor can detect 7 colors (and no color), while the NXT color sensor can only detect 6 colors
    • The EV3 Color Sensor has an indirect light mode that removes background lighting.
    • EV3 sensors can return new values ​​1000 times per second, while NXT sensors only return new values ​​333 times per second.

    6.3 Will LEGO® MINDSTORMS® EV3 sensors work with the NXT Smart Brick?

    No. LEGO MINDSTORMS EV3 sensors are digital and therefore will not work with the NXT Smart Brick.

    6.4 Will new connecting cables be required?

    No. LEGO® MINDSTORMS® EV3 uses the same RJ12 connection cables as LEGO MINDSTORMS NXT.

    6.5 Can LEGO® MINDSTORMS® EV3 sensors be used with NXT sensors?

    Yes. The LEGO MINDSTORMS EV3 Brick uses the same RJ12 connection cables as the LEGO MINDSTORMS NXT Brick.

    6.6 Can NXT sensors be used with the LEGO® MINDSTORMS® EV3 Brick?

    Yes. LEGO MINDSTORMS EV3 uses the same LEGO Technic elements and RJ12 connection cables.

    7.1 What motors are included in the LEGO® MINDSTORMS® EV3 set?

    Two large servomotors and one medium servomotor.

    7.2 How are LEGO® MINDSTORMS® EV3 Interactive Servos different from NXT Interactive Servos?

    The EV3 Large Motor features the same as the NXT, but the interface has been optimized to provide more quick assembly with more possibilities.
    The Medium Interactive Servo Motor is a completely new motor that provides new capabilities.

    7.3 Are LEGO® MINDSTORMS® EV3 servomotors and NXT servomotors interchangeable?

    Technically yes, but the large LEGO MINDSTORMS EV3 motors and NXT servo motors are designed differently. LEGO MINDSTORMS EV3's large motors provide more interesting experience design.

    7.4 Can LEGO® MINDSTORMS® EV3 and NXT motors be used together?

    7.5 Can LEGO® MINDSTORMS® EV3 servo motors be used with the NXT Brick?

    Yes. You can use both large servo motors and a medium servo motor with the NXT module.

    7.6 Can crank motors be used with the LEGO® MINDSTORMS® EV3 Brick?

    No. The connectors do not match.

    7.7 What does “daisy chain connection” mean?

    Daisy chaining is the ability to connect up to four LEGO® MINDSTORMS® EV3 Bricks using a USB cable, giving your robot 16 output ports and 16 input ports, controlled from the main LEGO MINDSTORMS EV3 Brick.

    7.8 What is needed to connect with a cable?

    Multiple LEGO® MINDSTORMS® EV3 Bricks, sensors and motors, plus an additional regular LEGO MINDSTORMS EV3 USB cable.

    The LEGO Mindstorms construction set is a set of electronic blocks and mating parts designed to create a programmable robot. LEGO introduced the first Mindstorms set back in 1998, and 8 years later, in 2006, the first version of the LEGO Mindstorms NXT 1.0 set was released, another 3 years later, in 2009, the second version of the set was released - LEGO Mindstorms NXT 2.0, and finally, in 2013, the LEGO Mindstorms EV3 set went on sale.

    The LEGO Mindstorms set includes standard LEGO parts such as axles, gears, beams, wheels and servos, as well as motors, sensors, and a programmable block. These sets are divided into resource and basic.

    The LEGO MINDSTORMS NXT Basic Set comes in three versions:

      8527 LEGO MINDSTORMS contains 577 pieces, released in 2006. This is the first version of the commercial kit;

      9797 LEGO MINDSTORMS Education NXT Base Set contains 431 pieces, manufactured in 2006. This - basic set for training, educational set;

      8547 LEGO MINDSTORMS NXT 2.0 contains 619 pieces, released in 2009. This is the second version of the commercial kit.

    Each of the three sets includes the same version of the NXT Smart Block. The firmware differs, but is easily updated, so the sets can be considered, in principle, equivalent.

    The LEGO MINDSTORMS Education Resource Set comes in two versions:

      9648 LEGO MINDSTORMS Education Resource Set;

      9695 LEGO MINDSTORMS Education Resource Set.

    The 2010 resource set contains 817 parts, they are more diverse.

    The 2013 LEGO MINDSTORMS EV3 3.0 Core Set comes in one version 31313 and contains 601 pieces. "EV" stands for Evolution here.

    LEGO Mindstorms sets are equipped with control units based on microcontrollers of several versions RCX, NXT and EV3. Currently there are three of them, in addition there are modifications 1.0; 2.0 and 3.0.

    The huge number of sensors that come with LEGO Mindstorms sets open up wide possibilities for creativity. Sensors are also produced by third-party manufacturers, such as Mindsensors and HiTechnic. Here are just a few examples standard sensors for LEGO Mindstorms NXT: NXT servo motor tachometer, NXT ultrasonic distance sensor, NXT touch sensor, NXT sound sensor, NXT light sensor. In general, the list is quite extensive.

    Let's take a look at what the LEGO MINDSTORMS EV3 set is all about.

    As for the EV3 filling, the intelligent unit is equipped with a Sitara AM1808 (ARM9) processor with a frequency of 300 MHz from Texas Instruments, has 64 MB RAM, 16 MB Flash memory, there is also a slot for microSDHC memory cards up to 32 GB. USB host and Bluetooth available, Wi-Fi via USB dongle possible, supported Apple devices. The unit is also equipped with a monochrome LCD display with a resolution of 178x128. All motors and NXT sensors are fully compatible with the EV3 Brick. By the way, the NXT block can be programmed for EV3, but some functions will not be available.

    The box with the construction set can be turned into a track with multi-colored zones, and the color sensors will interact perfectly with them. The parts in the box are initially placed in several separate bags. In addition, the kit includes a set of stickers and instructions.

    The EV3 Smart Brick is the heart of the building kit. Meals are provided 6 AA batteries. There are 6 buttons for control, and the backlight has three color modes indication. There are 4 input ports for connecting sensors, and there are also 4 command output ports. To connect the unit to a computer there is a miniUSB socket, a USB-host port for organizing connections, a built-in speaker and, as mentioned earlier, a slot for a memory card. Software interface allows you to create and configure programs directly from the block.

    In addition to the smart unit, the kit includes:

    2 large servomotors equipped with precise rotation sensors and capable of reaching 170 rpm with a maximum torque of 40 Ncm.

    There is also one middle servomotor, the torque here is less - up to 12 Ncm, but the speed can reach 250 per minute.

    Color and light sensor with the ability to distinguish 8 colors with a sampling rate of up to 1 kHz.

    Touch sensor capable of detecting clicks, touches, releases and counting their number.

    IR distance sensor, also applicable for remote control, capable of receiving a signal even from 2 meters, with a distance measurement range of up to 70 cm. 4 channels are available for individual reception of signals and control commands.

    Infrared beacon for IR sensor, can work as a remote control. The body has a green indicator LED and a channel switch. Can transmit to 4 separate channels within a radius of up to 2 meters. Automatically turns off after an hour of inactivity. Powered by two pinky batteries.

    In addition to the sensors included in the kit, other sensors can be used:

    Gyroscopic sensor for measuring the rotational movements of the robot with an accuracy of 3 degrees, sensitive to moments up to 440 degrees per second. Polling frequency up to 1 kHz.

    An ultrasonic sensor used to measure distances by transmitting and receiving reflected waves. Can work as a sonar and as a receiver sound waves as control signals. Capable of measuring distances up to 2.5 meters with an accuracy of 1 cm.

    Not only LEGO sensors and accessories are supported, but also third-party models such as Mindsensors and HiTechnic. These could be joysticks, compasses, accelerometers, etc. The range of various solutions is very, very wide.

    To program the robot, you can use the LEGO Mindstorms EV3 Home Edition software for Windows or OS X, which is easily downloaded from the official LEGO website. There is also an abundance of firmware, programming tutorials, videos, interactive instructions, and mission descriptions.

    Of course, EV3 can be controlled from a smartphone on Android or iOS, for this there is individual applications. Programming is possible in Java and in many other languages: ASM/C/C++/Perl/Python/Ruby/VB/Haskell/Lisp/Matlab/LabVIEW.

    On the official LEGO website you can find 17 models with instructions for building different robots from the EV3 kit. These are the models:

    TRACK3R is a high-terrain crawler robot with four interchangeable tools.

    SPIK3R is a scorpion robot that can turn around sharply, grab objects with its crusher claw, and its lightning tail will fight back anything that gets in its way.

    R3PTAR is a 35cm tall cobra robot that can slide across the floor and attack objects with its fangs at high speed.

    GRIPP3R - this robot is capable of lifting weights, can grab, lift and throw a tin can.

    EV3STORM is a crawler robot with many missions.

    BOBB3E - Bobcat® robotic loader with the ability remote control through the IR beacon buttons, can move or pick up various objects.

    BANNER PRINT3R is a robot printer. He can draw with a regular marker, drawing lines. You can set your own drawing.

    RAC3 TRUCK is a remote controlled racing truck. You can add a trailer.

    DINOR3X - Triceratops robot walks and turns on four legs.

    KRAZ3 - the robot responds to the IR beacon of its bug friend. You can also control the robot using a custom program or program it to follow the bug exclusively;

    EV3D4 - created based on “Star Wars”, can follow the owner, move using an IR beacon, and communicate. Supports a rich set of scenarios that can be programmed and expanded using the new EV3 Software.

    EL3CTRIC GUITAR - By strumming one string, fingering the fretless neck, and using the tremolo system, you can perform incredible solos on this guitar!

    EV3MEG is a robotic assistant that can move precisely along lines a certain color, thanks to the light sensor. Detects obstacles on the way and reacts to them. Capable of moving both independently and controlled using an IR beacon.

    Game EV3 - the robot can hide a ball under a cup, then swap the cups, and you have to guess where the ball is. Using an IR beacon you can set the level.

    MR.B3AM - measures the length of LEGO® Technic beams, determines the color and size of the beams.

    ROBODOZ3R - robot bulldozer. Can move independently or be controlled remotely. Clears a path for himself, rolling away and pushing obstructing objects out of the way.

    Due to the fact that these sets make you think, model, invent, and generally encourage creativity and development, it is not at all surprising that in many countries education in colleges and schools using LEGO Mindstorms sets is very widely introduced.

    Robot competitions have become quite popular, in which each educational institution can enter its robotics teams to compete. Such competitions are also held in Russia, the most famous of such events is RoboFest. The best of the best get to the World Robot Olympiad - WRO (World Robot Olympiad).

    Where to buy LEGO Mindstorms EV3?

    The price of LEGO Mindstorms EV3 depends on the set contents. Various sets of LEGO Mindstorms, its educational versions, can be purchased from specialist LEGO Education retailers.

    Andrey Povny

    The article describes the experience of using the Lego Mindstorms EV3 constructor to create a prototype of a robot with its subsequent software and manual control using Robot Control Meta Language (RCML).

    • Assembling a robot prototype based on Lego Mindstorms EV3
    • Quick installation and configuration of RCML for Windows
    • Software control of the robot based on the EV3 controller
    • Manual control of robot peripherals using a keyboard and gamepad
    Looking ahead a little, I’ll add that for implementation Lego controls-the robot uses the keyboard to create a program containing only 3 lines of program code. More details on how to do this are written under the cut.

    1. To begin with, a robot prototype was created from the Lego Mindstorms EV3 constructor, which will be used for programming and manual piloting.

    Description of the robot prototype

    The robot has a design similar to a car chassis. Two motors mounted on the frame have one common axis of rotation, which is connected to the rear wheels through a gearbox. The gearbox converts torque by increasing the angular velocity of the rear axle. The steering is assembled on the basis of a bevel gear.



    2. The next step is to prepare RCML for working with the Lego Mindstorms EV3 constructor.

    You should download the archives from executable files and library files and .

    The downloaded archives must be extracted to a directory with an arbitrary name, but you should avoid Russian letters in the title.

    Contents of the directory after unpacking the archives into it



    Next, you need to create a configuration file config.ini, which must be located in the same directory. To implement the ability to control the EV3 controller using a keyboard and gamepad, you must connect the lego_ev3, keyboard and gamepad modules.

    Listing configuration file config.ini for RCML

    Module = lego_ev3 module = keyboard module = gamepad


    Next, you need to pair the EV3 controller and adapter.

    Instructions for pairing the EV3 controller and Bluetooth adapter

    The instructions contain an example of pairing the Lego Ev3 controller and a PC running operating system Windows 7.

    1. You need to go to the settings section of the Ev3 controller, then to the “Bluetooth” menu item.

    2. Make sure that the configuration parameters are set correctly. The “Visibility”, “Bluetooth” checkboxes must be checked.

    3. You need to go to “Control Panel”, then “Devices and Printers”, then “Bluetooth Devices”.

    4. You must click the “Add device” button. A window will open to select available Bluetooth devices.

    5. Select the “EV3” device and click the “Next” button.

    6. The EV3 Controller displays the “Connect?” dialog box. You need to select the checkbox option and confirm your choice by pressing the center key.

    7. Next, the “PASSKEY” dialog box will be displayed, the numbers “1234” should be indicated in the input line, then you should confirm key phrase to pair devices by pressing the center key on the position with a check mark.

    8. In the device pairing wizard, a form will appear for entering the key for pairing devices. You need to enter the code “1234” and press the “Next” button.

    10. On the PC, you need to return to the “Control Panel”, then “Devices and Printers”, then “Bluetooth Devices”. On the list available devices The device that was paired will be displayed.

    11. Should double click go to the “EV3” connection properties.

    14. The COM port index specified in the properties should be used in the config.ini configuration file of the lego_ev3 module. The example shows the Bluetooth connection properties of a Lego EV3 controller using a standard serial port COM14.


    Further configuration of the module comes down to the fact that it is necessary to write in the configuration file of the lego_ev3 module the address of the COM port through which communication with the Lego robot is carried out.

    Listing of the config.ini configuration file for the lego_ev3 module

    Connection = COM14 dynamic_connection = 0


    Now you need to configure the keyboard module. The module is located in the control_modules directory, then keyboard. You should create a configuration file config.ini next to the keyboard_module.dll file. Before you create a configuration file, you need to determine what actions should be performed when pressing keys.

    The keyboard module allows you to use keys that have a specific numeric code. You can view the table of virtual key codes.

    As an example, I will use the following keystrokes:

    • The up/down arrows are used to rotate the rear wheel motor forward/backward
    • Left/right arrows turn wheels left/right
    The keyboard module configuration file describes which axes are available to the programmer to interact with the robot in manual control. Thus, in the example there are two control groups - these are the keyboard axes. To add a new axis, you must adhere to the following rules for describing axes.

    Rules for describing axes for the keyboard module

    1. When adding a new axis, it is necessary in the section add a property whose name is the axis name and assign it the value of the keyboard button in HEX format, and a similar record is created for each button, i.e. an axis name can be used multiple times. In general, writing to a section will look like this:

    Axis_name = keyboard_button_value_in_HEX_format
    2. It is necessary to set the maximum and minimum value that can be plotted along this axis. To do this it is necessary with new line add a section in the configuration file config.ini, the same as the axis name, and set the properties upper_value And lower_value, which correspond to the maximum and minimum of the axis, respectively. In general, this section looks like this:

    [axis_name] upper_value = maximum_axis_value lower_value = minimum_axis_value
    3. Next, you need to determine what value the axis will have if you press a button on the keyboard that was previously attached to it. The values ​​are determined by creating a section, the name of which consists of the axis name and the value of the keyboard button in HEX format, separated by an underscore. To set the default (unpressed) and pressed state, use the properties unpressed_value And pressed_value respectively, into which the values ​​are transferred. General view The section in this case looks like this:

    [axis-name_keyboard-key-value] pressed_value = axis_value when_key_pressed unpressed_value = axis_value_when_key_pressed
    The spoiler text is copied from the RCML documentation for ease of viewing.


    To implement control of the robot prototype, a configuration file for the keyboard module was created, which includes the go and rotate axes. The go axis is used to set the direction of movement of the robot. When you press the “up arrow” key, the axis will receive a value of 100; when you press the “down arrow” key, the axis will receive a value of -50. The rotate axis is used to set the steering angle of the front wheels. When you press the left arrow key, the axis value will be -5, when you press the right arrow key, the axis value will be 5.

    Listing of the config.ini configuration file for the keyboard module

    ;Required section ;axis_name = key_code (in HEX format) ;go axis receives values ​​from up_arrow go = 0x26 ;go axis receives values ​​from go_down_arrow = 0x28 ;rotate axis receives values ​​from left_arrow rotate = 0x25 ;rotate axis receives values ​​from right_arrow rotate = 0x27 ;Description of the go axis, must always have both keys ;Upper limit of go axis values ​​upper_value = -100 ;Lower limit of go axis values ​​lower_value = 100 ;Description of the rotate axis, must always have both keys;Upper limit of rotate axis values ​​upper_value = - 100 ;Lower limit of axis values ​​rotate lower_value = 100 ;Description of the behavior of the go axis for the *up_arrow* key (0x26) ;When pressing the *up_arrow* key, set the axis value to 50 pressed_value = 100 ;When releasing the *up_arrow* key, set the axis value to 0 unpressed_value = 0 ;Description of the behavior of the go axis for the *down_arrow* key (0x28) ;When pressing the *down_arrow* key, set the axis value to -50 pressed_value = -50 ;When releasing the *down_arrow* key, set the axis value to 0 unpressed_value = 0 ;Description behavior of the rotate axis for the *left_arrow* key (0x25) ;When pressing the *left_arrow* key, set the axis value to -5 pressed_value = -5 ;When releasing the *left_arrow* key, set the axis value to 0 unpressed_value = 0 ;Description of the behavior of the rotate axis for the key *right_arrow* (0x27) ;When pressing the *right_arrow* key, set the axis value to 5 pressed_value = 5 ;When releasing the *right_arrow* key, set the axis value to 0 unpressed_value = 0


    Next, to implement control using a gamepad, you need to configure the gamepad module. Configuring the module involves creating a configuration file config.ini next to gamepad_module.dll, located in the control_modules directory, then gamepad.

    Universal module configuration file for interacting with a gamepad

    ;Required section describing the axes used ;Axis to end manual control mode Exit = 9 ; 11 binary axes corresponding to the gamepad buttons B1 = 1 B2 = 2 B3 = 3 B4 = 4 L1 = 7 L2 = 5 R1 = 8 R2 = 6 start = 10 T1 = 11 T2 = 12 ; 4 axes of sticks; Right stick movement up/down RTUD = 13 ; Right stick movement left/right RTLR = 16 ; Left stick movement up/down LTUD = 15 ; Left stick movement left/right LTLR = 14 ; 2 axes of the cross;Movement of the cross up/down arrowsUD = 17 ;Movement of the cross left/right arrowsLR = 18 ;Description of the behavior of the B1 axis;When pressing the B1 button, set the axis value to 1 upper_value = 1;When releasing the B1 button, set the axis value to 0 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 upper_value = 1 lower_value = 0 ;Description of the behavior of the right stick axis up/down movement ;Axis value when moving to the maximum possible upper position upper_value = 0 ;Axis value when moving to the maximum possible lower position lower_value = 65535 upper_value = 0 lower_value = 65535 upper_value = 0 lower_value = 65535 upper_value = 0 lower_value = 65535 ;Description of the behavior of the D-pad axis up/down movement ;Axis value when pressing the up arrow upper_value = 1 ;Axis value when pressing the down arrow lower_value = -1 upper_value = 1 lower_value = -1


    Additional information about the specifics of setting up the gamepad module is displayed in the RCML reference manual.

    3. The next step is to write a program in RCML.

    In the root of the created directory, you need to create a program file. The name of the program file and its extension can be anything, but you should avoid Russian letters in the name. The file name used in the example is hello.rcml.

    For lego_ev3 module program code robot reservation has the following form:

    @tr = robot_lego_ev3;

    The lego_ev3 module connection page describes most of the functions supported by the controller. As a test example, a program was created to automatically enter the robot into a skid.

    The program algorithm is as follows:

    After reserving the first free robot, a connection is established between the two motors for subsequent work with them as if they were one. Then the robot begins to perform drifts. Program description robot actions allows you to accurately set the angles of rotation of the front wheels and the rotation speed of the rear wheels. Using this technique allows you to achieve results that are difficult to replicate during manual piloting with a keyboard or gamepad.

    Program listing for Lego robot in RCML language

    function main() ( @tr = robot_lego_ev3; //Reserve the robot @tr->setTrackVehicle("B","C",0,0); //Setting motor synchronization @tr->motorMoveTo("D",100, 0,0); system.sleep(500); @tr->trackVehicleForward(-100); system.sleep(1000); @tr->motorMoveTo("D",50,-50,0); (4000); @tr->motorMoveTo("D",50,50,0); system.sleep(4000); @tr->trackVehicleOff();


    To compile the program, you must use the window command line. First, you should move to the created directory with the executable files rcml_compiler.exe and rcml_intepreter.exe. Next you need to enter the following commands.

    Command to compile hello.rcml file:

    Rcml_compiler.exe hello.rcml hello.rcml.pc
    As a result of compilation, in the created directory there will be new file hello.rcml.pc.

    Screenshot of the command line after successful compilation



    Now you need to make sure that the EV3 controller is turned on and paired with the Bluetooth adapter. The gamepad must be connected to the PC. After this, you need to execute the command to execute the program file:

    Rcml_intepreter.exe hello.rcml

    Appearance command line during program execution



    A video demonstrating the robot's movement program is located at the bottom of the article.

    4. The next step is to control the robot in manual mode using the keyboard.

    Using the keyboard, you can control any robot motor. The example implements control of the following mechanisms:

    • Front wheel steering angle
    • Direction of rotation of the rear wheels

    Listing of the program for interaction between the keyboard and the Lego robot based on the EV3 controller

    function main() ( @tr = robot_lego_ev3; //Reserve the robot @tr->setTrackVehicle("B","C",0,0); //Setting motor synchronization system.hand_control(@tr,"keyboard", " straight","go", "speedMotorD","rotate"); )


    Next, you need to compile the program and run it. Result of manual control Lego robot using the keyboard is shown in the video at the bottom of the page.

    5. In addition to the keyboard, a gamepad module is available that allows you to manipulate the robot using a gamepad. To implement robot control using a gamepad, it is necessary to describe at the program level which axes of the robot will take the values ​​of the gamepad axes.

    Listing of the program for interaction between the gamepad and the Lego robot

    function main() ( @tr = robot_lego_ev3; //Reserve the robot @tr->setTrackVehicle("B","C",0,0); //Setting motor synchronization system.hand_control(@tr,"gamepad", " straight","RTUD", "speedMotorD","RTLR"); )


    Next, you should repeat the process of compiling the program and then execute it. The following shows the result of manually controlling a Lego robot using a gamepad, and all previously connected methods:

    This article briefly demonstrates just some of the capabilities of RCML. Most detailed description located in the reference manual.

    Tags:

    • lego mindstorms
    • robotics
    • programming
    Add tags

    Does your child dream of building and programming a robot that would carry out all his commands? Then we strongly recommend that you turn your attention to the unique series of construction sets from the world-famous Danish company Lego Robots.

    The Lego Mindstorms series is a special achievement of the Lego company. The thing is that these designers are based on electromechanics and robotics, which means they will be of interest to those who have original thinking and good imagination, as well as knowledge and understanding of all the technical processes taking place. That is why very often the Lego Robots set becomes a favorite toy not only for children of high school age, but also a hobby for their fathers and even grandfathers.

    By purchasing a Lego Mindstorms construction set, you get:

    The most interesting construction game

    Lego Robots is a product in the manufacture of which the latest technologies in the field of robotics were used. Toys from the Lego Mindstorms series have several motors, additional sensors and a color display. Lego Robots are able to capture the imagination of everyone who encounters them for the first time, because they behave like living beings. Lego Mindstorms react to touch and sound, and are able to determine the temperature of an object and distance. They can come when they hear your clap, pick up objects that are nearby, and distinguish between darkness and light. All this sounds quite complicated, but practice shows that any child who owns a computer at the user level can easily program a constructor from the Lego Robots series, creating his own personal robot. Note that commands for the Lego Mindstorms toy can be given not only from a computer, but also from any mobile phone, in which Bluetooth is installed.

    Huge opportunities for creativity development

    The Lego Robots set consists of more than 500 parts, which makes it possible to assemble a huge number of different modifications of robotic constructors: a mythological animal that lives only in your fantasies, a humanoid robot, a car of the future, etc.

    Quality product

    Before mass production of construction sets is launched, all their components are tested for strength on test benches. Each Lego Robots element is designed to last more than 50,000 clutch cycles. No heavy metals or other materials harmful to health are used to produce the plastic elements of Lego Mindstorms.

    We can talk endlessly about the developmental capabilities of Lego Mindstorms constructors. Lego Robots is not only an introduction to the latest technologies, but also their use. Young Lego Mindstorms owners will be incredibly proud and happy when they write and upload their first computer program. And there’s no need to talk about parents’ pride in their beloved child, who can easily cope with the latest technologies!

    The adult toy Lego Robots has already won millions of fans all over the planet and their number is only growing every day. Now there are even entire clubs dedicated to Lego Mindstorms constructors, in which people discuss ways to improve the functions of Lego Robots, share their achievements, discoveries, etc.

    Buy a Lego set from usMindstormsand create toys that will certainly come to life in your hands!

    This section presents Lego sets that already contain Power Functions elements or their functionality can be expanded using Power Functions elements. Next, you can familiarize yourself with the capabilities of Power Functions elements and learn how they can be used to increase functionality different sets Lego.

    What are Power Functions?
    LEGO Power Functions is a new electrical system with powerful motors and remote control.

    How does Power Functions work?
    The battery compartment provides power to the system. If you attach a motor to the connector, it will begin to rotate in one direction or another, depending on the position of the switch. A glowing green indicator indicates that the power is on. When the switch is in the center position, the power is off.


    The remote control and infrared receiver work together - the remote sends infrared signals to control the receiver. The latter has 2 connectors for connecting motors. By pressing one of the two levers forward or backward, you apply power to the motor connected to one of the receiver's outputs, and it begins to rotate in one direction or another. If the controls don't seem logical (for example, the model goes forward when you push the lever backwards), you can use the direction switch to reverse the direction of rotation of the motor connected to the corresponding output.


    The remote control system has 4 channels. The channel switches on the remote control and the receiver must be set to the same position for the remote control to control that receiver. So 4 children can play on different channels at the same time, or you can build 4 receivers into one model and thus have control over eight different functions.

    What batteries are needed?
    Battery compartment: 6 AA size batteries (AA) - alkaline or rechargeable batteries

    Control panel:
    3 AAA batteries

    How to install batteries?
    Battery compartment: Remove the covers on both sides and insert 3 AA batteries into each side, observing the polarity indicated on the bottom.

    Control panel:
    Unscrew the screw on the back of the remote, remove the cover and insert 3 AA batteries on each side, observing the polarity indicated on the bottom.

    It is important to replace all batteries at the same time - do not mix old and new - used batteries may leak or become hot.

    How long do batteries last?
    Battery Compartment: Approximately 4 hours of use when driving a heavy model like the Bulldozer.

    Control panel:
    2-3 years

    What indicates that it is time to replace the batteries?
    Battery compartment:
    Motors spin slower. Replace the batteries if the speed/power of the model decreases.

    Control panel:
    The distance from which control is possible has decreased.

    Why did my model only work for a short period of time after I changed the batteries?
    1. Make sure you replace all 6 batteries, not just the 3 on one side.
    2. Use alkaline or rechargeable batteries
    3. Remember to turn off the power to the battery compartment when not in use.

    Why is my model running slow?
    There are three possible reasons:
    1. Make sure that nothing interferes with the normal transmission from the motor to the moving parts, gears do not spin, etc.
    2. Make sure you are using new batteries
    3. Too many motors running at the same time and under heavy load.

    How many motors can run simultaneously from one battery compartment?
    As a rule, you can run 2 XL motors or 4 regular motors at the same time. The battery compartment and the infrared receiver are protected from overload, so attempting to start at the same time more It won't harm anything on the motors.

    When overload protection is enabled, the battery box or infrared receiver will reduce power sent to the motors until power consumption falls within acceptable limits. To restore power, reduce the load on the motor, or turn off unnecessary motors. The energy consumed by the motor depends on the load on it. At a reasonable (nominal) load, the motor operates most efficiently. If something obstructs the motor's rotation, it will consume more energy. The XL motor consumes approximately twice as much energy as a conventional motor.

    What should I do if my model doesn't work?
    1. Make sure you are using new batteries in the battery compartment and remote control.
    2. Make sure everything is connected correctly.
    3. Make sure the green light on the battery compartment is lit.
    4. Make sure the green light on the infrared receiver is lit.
    5. Make sure the infrared receiver is receiving signals from the remote control.
    6. Make sure there is nothing obstructing the rotation of the motors.

    How can I make sure that the infrared receiver is receiving signals from the remote control?
    1. The green indicator on the infrared receiver should be lit.
    2. The green indicator on the remote control lights up when signals are sent.
    3. Make sure the remote control and receiver are set to the same channel.
    4. The green indicator on the receiver will flash when receiving signals.

    From what distance can it be controlled?
    It depends on a lot - under normal conditions the distance can exceed 10 meters.

    The available distance is reduced:
    . Bright sunlight
    . Dead batteries in the control panel
    . Something is blocking the signals along their path

    Additional information and comments.

    • The levers on the remote control can only be in three fixed positions - forward, backward and neutral. The rotation speed of the motors is constant in each case. Moreover, this is a feature of the remote control - since the infrared receivers themselves contain great functionality, including the ability to adjust the speed of rotation of the motors using pulse width modulation.
    • Infrared receivers only work with new battery compartments - they do not work with old ones through an adapter.
    • Despite the limitation of two XL motors, it is quite possible to use two XL motors simultaneously to propel, say, a car, and at the same time periodically “steer” with a third conventional motor.
    • The XL motor contains “technical” holes in the front and sides for attaching the model, the regular motor contains holes in the front and a standard Lehov bottom plate at the bottom.
    • The rotation speed of an unloaded conventional motor is 405 rpm, XL is 220 rpm. When using rechargeable batteries (total voltage 7.2 volts), the speed is reduced by approximately one and a half times.
    • It is quite possible that at least new remote control control - with the ability to regulate the speed of rotation of the motors - such functionality is already built into the IR receiver.
    • Power Functions have “through” connectors. That is, more than one device is connected to one output - just each next on top of the other. Thus, you can connect two motors to one output of the infrared receiver and turn them on simultaneously with one lever.