This article is automatically translated from Russian by Google Translator.
Specialized blocks for LEGO EV3 are divided into several categories:
Action — blocks that perform some action on the robot: turn on motors, play sound, etc.
Waiting — units waiting for some event to occur: certain sensor readings, button presses, etc.
Drawings on the display — blocks used to display graphics and text on the screen
Line Leader — blocks for the advanced "Line Leader" sensor.
For the blocks available for all platforms, see the article "Common Blocks".
Sends this message to the parallel task with the specified identifier (the identifier must be specified when creating the task in the "Fork" block).
The message can be any expression.
Play a fixed-frequency sound on the robot.
Parameters:
Whether to wait for the sound to end or go straight to the next block. Valid values are "true", "false".
Playback volume.
Play the sound on the robot at a given frequency and duration. Аналогичен блоку «Гудок», но позволяет также задавать параметры звука.
Parameters:
Frequency (Hz).
Duration (ms).
Whether to wait for the sound to end or go to the next block immediately. Valid values - true, false.
Playback volume (from 0 to 100%).
Turn on the motors on the set ports with the set power. The ports are set by the letters A, B, or C, separated by commas.
The power is set as a percentage by a number from -100 to 100, if a negative value is set, the motor turns on in reverse mode.
The motors have different modes of operation: braking mode and sliding mode (indicated by a red or green rectangle on the block, respectively). The modes affect the way the motor responds to a command - braking mode stops the motor when shut down, the sliding mode allows the motor to crank through its inertia.
Turn on the motors in reversing mode on the set ports with the set power. The parameters are the same as for the "Motors Forward" block.
Turn off the motors on the specified ports.
Reset the number of motor revolutions.
Set the color of the LED on the front of the robot.
Send an email to another robot. If the recipient's name is not filled in, the message will be sent to all connected robots.
Sets the gyroscope to 0 at the current position.
Starts the compass calibration programmatically. To calibrate the compass, the robot must turn in place more than 540° in one direction and then in the opposite direction. After the turns, the "Stop Compass Calibration" block must be added.
Finishes the compass calibration. The calibration result is returned in a variable. A nonzero result means a successful calibration.
Read RGB in a variable.
Wait to receive a message from another parallel task.
When a message is received, it will be assigned to the variable specified in the block.
The "Wait for message" property allows you to specify what to do if the message queue is empty: wait for a new message to arrive or continue working by assigning an empty string to the variable.
The message is automatically converted to the same type as the receiver variable. For example, if you send a number as a string, it will be accepted as a number.
Wait until the touch sensor is triggered.
The parameter specifies the number of the port to which the sensor is connected. Valid values: 1, 2, 3, 4.
Wait until the RPM counter reading on the specified motor reaches the RPM Limit value specified in the "RPM Limit" parameter value.
Parameters:
Port - the name of the port to which the motor is connected (A, B, or C).
Read value - the operation that will be used for comparison with the entered RPM limit.
RPM limit.
Wait for the color sensor in color recognition mode to return the specified color.
Parameters:
Color.
Port - the number of the port to which the color sensor is connected.
Wait until the value returned by the color sensor on the specified port is comparable to the value specified in the Intensity parameter.
Parameters:
Intensity (0 to 100%).
Port - number of the port to which the color sensor is connected.
Read value - the operation that will be used to compare with the entered intensity.
Wait until the value returned by the light sensor on the specified port is comparable to the value specified in the Percentage parameter.
Parameters:
Percentages (from 0 to 100%).
Port - the number of the port to which the color sensor is connected.
Read value - the operation that will be used to compare with the Percent value.
Wait until the distance returned by the ultrasonic distance sensor is comparable to that specified in the Distance parameter value.
Parameters:
Distance (in centimeters, from 0 to 255).
Port - number of the port to which the distance sensor is connected.
Read value - the operation that will be used for comparison with the entered distance.
Wait for the button on the robot body to be pressed.
Wait until the volume read by the microphone on the specified port is above or below the set value.
Wait until the value returned by the gyroscope on the specified port is comparable to the value specified in the "Value" parameter.
Saves a message from another robot to a given variable. If there is no message, the robot waits for the message to arrive if the flag is set. Otherwise, the variable is set to the default value.
Prints the specified line at the specified location on the robot's screen.
The default value of the Text property is treated as a pure string, and it will be displayed that way. To make the system assume that this is a textual expression (which can be useful, for example, when debugging variable values), check the "Calculate" checkbox in the Property Editor.
Erase everything that is drawn on the screen.
Draw a rectangle on the screen.
Parameters:
X, Y - coordinates of the upper left corner.
The width of the rectangle.
The height of the rectangle.
Update the picture (true or false).
Draw a point on the screen at the specified coordinates.
Draw a segment on the screen.
Parameters:
X1, Y1 - coordinates of the beginning of the segment.
X2, Y2 - coordinates of the end of the segment.
Update the picture (true or false).
Draw a circle on the screen with a given center and a given radius.
Parameters:
X, Y - coordinates of the center of the circle.
The radius of the circle.
Update the picture (true or false).
Calibrates the white threshold for the sensor. Must be on white.
Calibrates the black threshold for the sensor. Should be on black.
Sets the sensor setpoint (middle of the sensor above the line), P/(P factor), I/(I factor), D/(D factor).
Sets the line sensor to power save mode.
Includes a line sensor for operation.
Reads the weighted average value into a variable.
The value is calculated within the sensor, where each of the eight sensors is taken with a factor, and the average is calculated.
A value between 0 and 80 is expected (-1 is an error).
Read values from the sensor (eight values). Values from 0 to 100. 0 is black, 100 is white.
Reads the control value into a variable. The value is calculated inside the sensor and can be used immediately for motors.
A value from -100 to 100 is expected (-101 is an error).
Icon
Name
Description
Sends this message to the parallel task with the specified identifier (the identifier must be specified when creating the task in the "Fork" block).
Play a fixed-frequency sound on the robot.
Play the sound on the robot at a given frequency and duration.
Turn on the motors on the set ports with the set power.
Turn on the motors in reversing mode on the set ports with the set power.
Turn off the motors on the specified ports.
Reset the number of motor revolutions.
Set the color of the LED on the front of the robot.
Send an email to another robot.
Sets the gyroscope to 0 at the current position.
Starts the compass calibration programmatically.
Finishes the compass calibration.
Read RGB in a variable.
Icon
Name
Description
Wait to receive a message from another parallel task.
Wait until the touch sensor is triggered.
Wait until the RPM counter reading on the specified motor reaches the RPM Limit value specified in the "RPM Limit" parameter value.
Wait for the color sensor in color recognition mode to return the specified color.
Wait until the value returned by the color sensor on the specified port is comparable to the value specified in the Intensity parameter.
Wait until the value returned by the light sensor on the specified port is comparable to the value specified in the Percentage parameter.
Wait until the distance returned by the ultrasonic distance sensor is comparable to that specified in the Distance parameter value.
Wait for the button on the robot body to be pressed.
Wait until the volume read by the microphone on the specified port is above or below the set value.
Wait until the value returned by the gyroscope on the specified port is comparable to the value specified in the "Value" parameter.
Saves a message from another robot to a given variable.
Icon
Name
Description
Prints the specified line at the specified location on the robot's screen.
Erase everything that is drawn on the screen.
Draw a rectangle on the screen.
Draw a point on the screen at the specified coordinates.
Draw a segment on the screen.
Draw a circle on the screen with a given center and a given radius.
Icon
Name
Description
Calibrates the white threshold for the sensor.
Calibrates the black threshold for the sensor.
Sets the sensor setpoint (middle of the sensor above the line), P/(P factor), I/(I factor), D/(D factor).
Sets the line sensor to power save mode.
Includes a line sensor for operation.
Reads the weighted average value into a variable.
Read values from the sensor (eight values).
Reads the control value into a variable.