# TRIK specific blocks

TRIK specific blocks consist of three categories:

1. [Actions](/en/trik/programming-visual/blocks.md#action-blocks) - blocks that perform any action on the controller: turning on the motors, playing sounds, etc.
2. [Waiting](/en/trik/programming-visual/blocks.md#waiting-blocks) - blocks waiting for an event to occur: certain sensor readings, pressing a button, etc.
3. [Drawing](/en/trik/programming-visual/blocks.md#drawing-blocks) - blocks displaying graphics and text on the screen.

For blocks common for all platforms see the article

{% content-ref url="/pages/-M0P0XKqjxR8vRCElOaf" %}
[Common blocks](/en/studio/programming-visual/blocks.md)
{% endcontent-ref %}

## Action blocks

|                                 Icon                                |                                               Name                                               | Description                                                                                                                                                                          |
| :-----------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| <img src="/files/-M57QXJiHc6qgZIyiPRg" alt="" data-size="original"> |      [Send Message To Thread](/en/trik/programming-visual/blocks.md#send-message-to-thread)      | Sends the message to the parallel thread with the identifier given.                                                                                                                  |
| <img src="/files/-M57QaGyasyjni8VQga5" alt="" data-size="original"> |             [Get Button Code](/en/trik/programming-visual/blocks.md#get-button-code)             | Saves the code of the button pressed on the robot to the specified variable.                                                                                                         |
| <img src="/files/-M57QiEPSYu9I7BBNcH9" alt="" data-size="original"> |                   [Play Tone](/en/trik/programming-visual/blocks.md#play-sound)                  | Plays a sound with specified frequency and duration on the controller.                                                                                                               |
| <img src="/files/-M57QmLtcyz0CBzpXa6G" alt="" data-size="original"> |                 [Play Sound](/en/trik/programming-visual/blocks.md#play-sound-1)                 | Play the specified sound file on the controller.                                                                                                                                     |
| <img src="/files/-M57Qp9uJVF-ZFFq7fAi" alt="" data-size="original"> |              [Motors Forward](/en/trik/programming-visual/blocks.md#motors-forward)              | Turn on the motors at the specified ports with the specified power.                                                                                                                  |
| <img src="/files/-M57QrQI76KSJfeBGIAn" alt="" data-size="original"> |             [Motors Backward](/en/trik/programming-visual/blocks.md#motors-backward)             | Turn on the motors in reverse mode at the specified ports with the specified power.                                                                                                  |
| <img src="/files/-M57Qt8z1UfpFqGfCMXH" alt="" data-size="original"> |                 [Stop Motors](/en/trik/programming-visual/blocks.md#stop-motors)                 | Turn off the motors at the specified ports.                                                                                                                                          |
| <img src="/files/-M57Qvi0g3VL0tbuXBsu" alt="" data-size="original"> |               [Clear Encoder](/en/trik/programming-visual/blocks.md#clear-encoder)               | Reset the motors revolutions count for the specified ports.                                                                                                                          |
| <img src="/files/-M57R2jBMdeeLyhM02ne" alt="" data-size="original"> |               [Angular Servo](/en/trik/programming-visual/blocks.md#angular-servo)               | Set the servos rotation angle on the specified ports to the specified position.                                                                                                      |
| <img src="/files/-M57R81udW81QciRNj1T" alt="" data-size="original"> |                         [Say](/en/trik/programming-visual/blocks.md#say)                         | Speak through the speaker the phrase passed as an argument.                                                                                                                          |
| <img src="/files/-M57RAxT3_G5--akNH4A" alt="" data-size="original"> |                         [LED](/en/trik/programming-visual/blocks.md#led)                         | Set the specified controllers LED color.                                                                                                                                             |
| <img src="/files/-M57RFMIzub5YqwpZOc4" alt="" data-size="original"> |                 [System Call](/en/trik/programming-visual/blocks.md#system-call)                 | The block has a logical parameter "Code". If it's True, the content of the "Command" parameter translates directly into the program code. Otherwise, an OS' CLI call will be pulled. |
| <img src="/files/-M57RS3Q4ZTwd9ASoTXU" alt="" data-size="original"> |         [Initialize Camera](/en/trik/programming-visual/blocks.md#initialize-videocamera)        | Turn on the video camera on the controller in one of the three modes.                                                                                                                |
| <img src="/files/-M57eSYv5fme97XrUIUp" alt="" data-size="original"> |                 [Stop Camera](/en/trik/programming-visual/blocks.md#stop-camera)                 | Turn off the camera.                                                                                                                                                                 |
| <img src="/files/-M57SZsbVuv2dRcL2Ukr" alt="" data-size="original"> |           [Detect by Camera](/en/trik/programming-visual/blocks.md#detect-videocamera)           | Fixes the image in the center of the frame and initializes the line sensor or object sensor with it.                                                                                 |
| <img src="/files/-M57Sesq_8LGWobTco5h" alt="" data-size="original"> | [Line Detector into Variable](/en/trik/programming-visual/blocks.md#line-detector-into-variable) | Places the current line sensor reading into the specified variable.                                                                                                                  |
| <img src="/files/-M57RVnFDrRCX7XLLdwn" alt="" data-size="original"> |      [Enable Video Streaming](/en/trik/programming-visual/blocks.md#enable-video-streaming)      | Starts a video broadcast on the robot.                                                                                                                                               |
| <img src="/files/-M57earRZPK8SU4o2FNV" alt="" data-size="original"> |     [Disable Video Streaming](/en/trik/programming-visual/blocks.md#disable-video-streaming)     | Stops the video feed from the robot's camera.                                                                                                                                        |
| <img src="/files/-M57RxAFVN35PyCwb4q4" alt="" data-size="original"> |                [Send message](/en/trik/programming-visual/blocks.md#send-message)                | Sends the message to the robot with the board number specified.                                                                                                                      |
| <img src="/files/-M57S2sZfMFu2W5utr4T" alt="" data-size="original"> |               [Write to File](/en/trik/programming-visual/blocks.md#write-to-file)               | Writes a given message to a file.                                                                                                                                                    |
| <img src="/files/-M57S7jgyTLmUKbLQ7XT" alt="" data-size="original"> |                 [Remove File](/en/trik/programming-visual/blocks.md#remove-file)                 | Deletes a file.                                                                                                                                                                      |
| <img src="/files/-M57eeLDEnLLI1jbmK2D" alt="" data-size="original"> |         [Calibrate Gyroscope](/en/trik/programming-visual/blocks.md#calibrate-gyroscope)         | Sets the gyroscope angle to zero at the current position.                                                                                                                            |

### Send Message To Thread

![Send Message To Thread](/files/-M583uRjOrCpHJIplt5t)

Sends the message to a parallel task with a specified identifier (the identifier must be specified while creating the task in the "Fork" block).

The message can be arbitrary.

### Get Button Code

![Get Button Code](/files/-M584J92w9wcfy3VMYoh)

Assigns the pressed button code to a specified variable.

The "Waiting" property allows you to wait for the button to be pressed. If the button is not pressed, the variable will be set to -1.

### Play Tone <a href="#play-sound" id="play-sound"></a>

![Play Tone](/files/-M584M1owLj95nZKiFAA)

Plays a sound with specified frequency and duration on the controller.

### Play Sound

![Play Sound](/files/-M584PA6gcjuLPNc_G_V)

Plays an audio file on the controller.

The file must be pre-loaded on the controller. The path to the file is relative to the `trik` folder on the controller. You can download the file to the controller, for example, using the [WinSCP](/en/studio/utilities/winscp.md) program.

### Motors Forward

![Motors Forward](/files/-M584RejWRVmyNIbxoDS)

Turn on the motors on the given ports with the given power.

The ports are specified by lines M1, M2, M3, and M4, separated by commas. The power specified as a percentage by a number from -100 to 100. If the value is negative, the motors will be reversed.

### Motors Backward

![Motors Backward](/files/-M584UOkF5zwceg-r76w)

Turn on the motors in reverse mode on the given ports with the given power.

Parameters are similar to the "motors forward" block.

### Stop Motors <a href="#stop-motors" id="stop-motors"></a>

![Stop Motors](/files/-M584XE2UGPmLKBlpRfe)

Stop the motors on the specified ports.

The ports are specified by lines M1, M2, M3, and M4, separated by commas.

### Clear Encoder

![Clear Encoder](/files/-M584bbH4xIwGd2Fpt-o)

Reset the motors revolutions count on the specified ports.

The ports are specified by lines E1, E2, E3, and E4, separated by commas.

### Angular Servo

![Angular Servo](/files/-M584i5kCPyqbScWz19X)

Set the servos rotation angle on the specified ports to the specified position (from -90 to 90 degrees).

The ports are specified by comma separated values.

### Say <a href="#say" id="say"></a>

![Say](/files/-M584kOl1brqm1u53t25)

Use the speaker to say the phrase passed as the block argument.

### LED <a href="#led" id="led"></a>

![LED](/files/-M584nGic6Z3JYwk5tGl)

Set the specified LED color on the controller.

### System Call

![System Call](/files/-M584rWH7bcpygz_zl8J)

The block has a logical parameter "Code". If it's True, the content of the "Command" parameter translates directly into the program code. Otherwise, an OS' CLI call will be pulled.

### Initialize Camera <a href="#initialize-videocamera" id="initialize-videocamera"></a>

![Initialize Camera](/files/-M5851KeCR18SnT0QHny)

Enable the video camera on the controller in one of three modes:

1. **Line Sensor** - detects a color line in the center of the frame and subsequently returns the deviation of the center of the line from the center of the frame as a number in the range from -100 (left) to 100 (right).
2. **Object sensor** - detects a contrasting object in the center of the frame and later returns the coordinates of its center and diameter in pixels.
3. **Color sensor** - returns the dominant color in the center of the frame as its coordinates in the RGB color scale.

### Detect by Camera <a href="#detect-videocamera" id="detect-videocamera"></a>

![Detect by Camera](/files/-M56TT9WVmZRRK2KRFSD)

Captures the image in the center of the frame and initializes a line sensor or object sensor with it. The camera must be switched on in the appropriate mode with the "Initialize Camera" block.

### Line Detector into Variable <a href="#line-detector-into-variable" id="line-detector-into-variable"></a>

![Line Detector inti Variable](/files/-M585cs06Wd8qwxeuZvW)

Places the current line sensor reading in the specified variable.

The camera must be switched on inline sensor mode by the "Initialize Camera" block and initialized by the "Detect by camera" block.

### Enable Video Streaming

![Enable Video Streaming](/files/-M585gD84zEiNNaqb_Wz)

Starts a video broadcast on the robot.

The video can be viewed on the TRIK control panel or in a browser at the address\
`{robots ip-address}:8080/?action=stream/`.

### Send message <a href="#send-message" id="send-message"></a>

![Send message](/files/-M585_bUADBux_LqLMIk)

Sends the message to the robot with the board number specified.

The robot must be on the same network as the robot sending the message and registered as master or slave using `Settings → Messages` on the robot. If there is more than one robot with the given board number in the network, all of them will receive the message.

### Write to File <a href="#write-to-file" id="write-to-file"></a>

![Write to File](/files/-M585Xzsv8xftnx445LL)

Writes the given expression to a file.

The path can be absolute or relative to the folder containing `trik-studio.exe`.

The file can be retrieved from the controller, e.g. with the [WinSCP](/en/studio/utilities/winscp.md) program for Windows or SCP for Linux.

### Remove File

![Remove File](/files/-M585VCANzrPGpAHeq7O)

Deletes a file.\
\
The path can be absolute or relative to the folder containing `trik-studio.exe`.

### Stop Camera

![Stop Camera](/files/-M585R708SOuIH77Yor8)

Turn off the camera.

### Disable Video Streaming

![Disable Video Streaming](/files/-M585Ne4AyFOPT5ZBdT1)

Stop the video feed from the robot's camera.

### Calibrate Gyroscope

![Calibrate Gyroscope](/files/-M585JdJVY7Fqut3m6b8)

Sets the gyroscope angle to zero at the current position..

## Waiting Blocks

| Icon                                                                |                                                Name                                                | Description                                                                                                                                    |
| ------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------: | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="/files/-M57ypVi6IEo1RijFtkO" alt="" data-size="original"> |  [Receive Message From Thread](/en/trik/programming-visual/blocks.md#receive-message-from-thread)  | Wait for a message from another parallel task.                                                                                                 |
| ![](/files/-MHFotHDB2zv6DZZh-ty)                                    |                   [User input](/en/trik/programming-visual/blocks.md#user-input)                   | Wait for the user to enter a value.                                                                                                            |
| <img src="/files/-M57zKmUw9MPthrXRzuK" alt="" data-size="original"> |           [Wait for Gyroscope](/en/trik/programming-visual/blocks.md#wait-for-gyroscope)           | Wait until the value returned by the gyro sensor on the specified port is greater or less than the one specified in the "degrees" parameter.   |
| <img src="/files/-M57zO8T739p60_XRLhD" alt="" data-size="original"> |        [Wait for Touch Sensor](/en/trik/programming-visual/blocks.md#wait-for-touch-sensor)        | Wait for the touch sensor to operate on the specified port.                                                                                    |
| <img src="/files/-M57zS2SvVfh9Rfjox1U" alt="" data-size="original"> |               [Wait for Light](/en/trik/programming-visual/blocks.md#wait-for-light)               | Wait until the value returned by the light sensor on the specified port is greater or less than the one specified in the "percents" parameter. |
| <img src="/files/-M57zbAEV2VNZIm3dNmT" alt="" data-size="original"> | [Wait for Ultrasonic Distance](/en/trik/programming-visual/blocks.md#wait-for-ultrasonic-distance) | Wait until the distance returned by the ultrasonic distance sensor is greater or less than the one specified in the "distance" parameter..     |
| <img src="/files/-M57zi--uScH_i_9EzPI" alt="" data-size="original"> |   [Wait for Infrared Distance](/en/trik/programming-visual/blocks.md#wait-for-infrared-distance)   | Wait until the distance returned by the infrared distance sensor is greater or less than the one specified in the "distance" parameter..       |
| <img src="/files/-M57zl2xDEXflqasoKBr" alt="" data-size="original"> |             [Wait for Encoder](/en/trik/programming-visual/blocks.md#wait-for-encoder)             | Wait until the revolutions counter reading on the specified port is greater or less than the "Tacho limit" value.                              |
| <img src="/files/-M57zo5QhGbG1jYYl-bW" alt="" data-size="original"> |              [Wait for Button](/en/trik/programming-visual/blocks.md#wait-for-button)              | Wait until the specified button on the robot is pressed.                                                                                       |
| <img src="/files/-M57zvnNNubsZZCgmTUu" alt="" data-size="original"> |             [Wait for Message](/en/trik/programming-visual/blocks.md#wait-for-message)             | Wait for the message in the mailbox. When the message is received, it will be assigned to the specified variable.                              |
| <img src="/files/-M57zzClLKdwrmgj9ATp" alt="" data-size="original"> |        [Wait Gamepad Button](/en/trik/programming-visual/blocks.md#wait-for-gamepad-button)        | Wait for the button to be pressed on the remote control connected to the robot.                                                                |
| <img src="/files/-M58-6B1MYOp6WYtyfhO" alt="" data-size="original"> |             [Wait Pad Press](/en/trik/programming-visual/blocks.md#wait-for-pad-press)             | Wait for one of the two active areas of the RC to be pressed.                                                                                  |
| <img src="/files/-M58-9LnSPpJnIP9plqI" alt="" data-size="original"> |       [Wait for Gamepad Wheel](/en/trik/programming-visual/blocks.md#wait-for-gamepad-wheel)       | Wait for the desired tilt of the RC.                                                                                                           |
| <img src="/files/-M58-C66OVf_TIch0RDx" alt="" data-size="original"> |  [Wait for Gamepad Disconnect](/en/trik/programming-visual/blocks.md#wait-for-gamepad-disconnect)  | Wait until the RC is disconnected from the robot. If the RC is not connected, the program will continue running.                               |
| <img src="/files/-M58-E9XVfErkA5ANFEw" alt="" data-size="original"> |     [Wait for Gamepad Connect](/en/trik/programming-visual/blocks.md#wait-for-gamepad-connect)     | Wait for the RC to connect to the robot. If the RC is already connected, the program will continue running.                                    |

### Receive Message From Thread <a href="#receive-message-from-thread" id="receive-message-from-thread"></a>

![Receive Message From Thread](/files/-M587b6vLBc_UZlx81sw)

Wait for a message from another parallel task.

The message text will be assigned to the specified variable.

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.

### User input

![User input](/files/-MHFoZWxXEMPetF10goi)

Wait for the user to enter a value. The value will be assigned to the specified variable.

#### Properties

The block has three properties:

| Property     | Description             |
| ------------ | ----------------------- |
| **Variable** | Variable name.          |
| **Default**  | Default variable value. |
| **Text**     | Text field description. |

**Example**

| **Block**                                                           | Execution                                                           |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| <img src="/files/-MUiizk4KdNqMea1AT0j" alt="" data-size="original"> | <img src="/files/-MUijAsvgEpqKIO72ROP" alt="" data-size="original"> |

### Wait for Gyroscope

![Wait for Gyroscope](/files/-M587eGNbbB8tI78mu04)

Wait until the value returned by the gyro sensor on the specified port is greater or less than the one specified in the "degrees" parameter..

### Wait for Touch Sensor <a href="#wait-for-touch-sensor" id="wait-for-touch-sensor"></a>

![Wait for Touch Sensor](/files/-M587gpayfJef9HH-JnS)

Wait for the touch sensor to operate on the specified port.

### Wait for Light <a href="#wait-for-light" id="wait-for-light"></a>

![Wait for Light](/files/-M587Yu5kT5w4dpSGisS)

Wait until the value returned by the light sensor on the specified port is greater or less than the one specified in the "percents" parameter.\
\
Parameters:

* "Percents" - value to compare with the value returned by the light sensor.
* "Port" - the port to which the light sensor is connected.
* "Read value" - the operation that will be used to compare with the value of the "Percents" parameter.

### Wait for Ultrasonic Distance <a href="#wait-for-ultrasonic-distance" id="wait-for-ultrasonic-distance"></a>

![Wait for Ultrasonic Distance](/files/-M587WCP5OjHG86wu2Zm)

Wait until the distance returned by the ultrasonic distance sensor is greater or less than the one specified in the "distance" parameter (distance is set in centimeters, from 0 to 300).

Parameters:

* "Distance" - value to compare with the value returned by the distance sensor.
* "Port" - the port to which the distance sensor is connected.
* "Read value" - the operation to be used for comparison with the value of the Distance parameter.

### Wait for Infrared Distance

![Wait for Infrared Distance](/files/-M587SIFUrsraht9Qbky)

Wait until the distance returned by the infrared distance sensor is greater or less than the one specified in the "distance" parameter.

By default, the distance on ports A1 and A2 is set in centimeters (from 0 to 100). It is not recommended to connect other sensors to these ports as incorrect values may be read.

Another parameter is the number of the port to which the distance sensor is connected. The last parameter specifies the operation to be used for comparison with the distance.

### Wait for Encoder <a href="#wait-for-encoder" id="wait-for-encoder"></a>

![Wait for Encoder](/files/-M587LCzIrUOaTVg9C4b)

Wait until the revolutions count reading on the specified port is greater or less than the Tacho limit value.

### Wait for Button <a href="#wait-for-button" id="wait-for-button"></a>

![Wait for Button](/files/-M587I3TRtlzluXsZfN0)

Wait until the specified button on the robot is pressed.

### Wait for Message <a href="#wait-for-message" id="wait-for-message"></a>

![Wait for Message](/files/-M587FFDQKmimUVl55Ya)

Wait for the message in the mailbox. When the message is received, it will be assigned to the specified variable.

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 putting an empty string into the variable.

The message is automatically converted to the type corresponding to the receiver variable type, i.e. you can, for example, send a number as a string and accept it as a number.

### Wait Gamepad Button <a href="#wait-for-gamepad-button" id="wait-for-gamepad-button"></a>

![Wait Gamepad Button](/files/-M587CGEYyvb_XtS-GUF)

Wait for the button to be pressed on the remote control connected to the robot. The buttons are numbered from 1 to 5.

### Wait Pad Press <a href="#wait-for-pad-press" id="wait-for-pad-press"></a>

![Wait Pad Press](/files/-M5878byJ41xEC0fqSm4)

Wait for one of the two active areas of the RC to be pressed. The coordinates of the click can be obtained with the "[gamepadPad](/en/trik/programming-visual/sensory-variables.md#gamepadpad)" sensory variables.

### Wait for Gamepad Wheel

![Wait for Gamepad Wheel](/files/-M5876OEn8PE8pe3GwiE)

Wait for the desired tilt of the RC.

The tilt is only registered if the remote is in "steering" mode, the tilt angle is coded with numbers from -100 (maximum left) to 100 (maximum right).

Another parameter specifies the operation that will be used to compare with the Angle parameter value.

### Wait for Gamepad Disconnect <a href="#wait-for-gamepad-disconnect" id="wait-for-gamepad-disconnect"></a>

![Wait for Gamepad Disconnect](/files/-M5873VZcqz10PTfhDZr)

Wait until the RC is disconnected from the robot. If the RC is not connected, the program will continue running.

### Wait for Gamepad Connect <a href="#wait-for-gamepad-connect" id="wait-for-gamepad-connect"></a>

![Wait for Gamepad Connect](/files/-M58712VVt04Ex5ZahZt)

Wait for the RC to connect to the robot. If the RC is already connected, the program will continue running.

## Drawing Blocks

| Icon                                                                |                                    Name                                    | Description                                                                                                                                                                                                                           |
| ------------------------------------------------------------------- | :------------------------------------------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <img src="/files/-M580iWSqeTAQwq3hWB3" alt="" data-size="original"> |    [Painter Color](/en/trik/programming-visual/blocks.md#painter-color)    | Specify the color to draw simple graphical shapes on the robot's screen.                                                                                                                                                              |
| <img src="/files/-M580kkbRdA4q-cb10MU" alt="" data-size="original"> |    [Painter Width](/en/trik/programming-visual/blocks.md#painter-width)    | Specify the line width used to draw simple graphical figures on the robot's screen.                                                                                                                                                   |
| <img src="/files/-M580nHEEuZ2xfB8PA8Y" alt="" data-size="original"> |       [Draw Pixel](/en/trik/programming-visual/blocks.md#draw-pixel)       | Draw a dot on the screen at the specified coordinates.                                                                                                                                                                                |
| <img src="/files/-M580r3HM3j4oEEU2KcL" alt="" data-size="original"> |        [Draw Line](/en/trik/programming-visual/blocks.md#draw-line)        | Draw a line segment on the screen. Segment ends are given as parameters to the block.                                                                                                                                                 |
| <img src="/files/-M580pC_bqwcbeEbnung" alt="" data-size="original"> |   [Draw Rectangle](/en/trik/programming-visual/blocks.md#draw-rectangle)   | Draw a rectangle on the screen. The coordinates of the upper left corner, the width, and the height of the rectangle are specified as parameters.                                                                                     |
| <img src="/files/-M580tMbl4I0nHUrz9s9" alt="" data-size="original"> |     [Draw Ellipse](/en/trik/programming-visual/blocks.md#draw-ellipse)     | Draw an ellipse inscribed in a given rectangle on the screen.                                                                                                                                                                         |
| <img src="/files/-M580vdpu51HDgOGV-RD" alt="" data-size="original"> |         [Draw Arc](/en/trik/programming-visual/blocks.md#draw-arc)         | Draw an arc on the screen, given the coordinates of the rectangle in which it will be inscribed, and the angles (in degrees) of its beginning and end on the circle. If the beginning and the end coincide, the circle will be drawn. |
| <img src="/files/-M580yAPcSOa8aWR-nZA" alt="" data-size="original"> |            [Smile](/en/trik/programming-visual/blocks.md#smile)            | Draw a smiley face on the screen.                                                                                                                                                                                                     |
| <img src="/files/-M581-PnAitsHQgnhcDE" alt="" data-size="original"> |        [Sad Smile](/en/trik/programming-visual/blocks.md#sad-smile)        | Draw a sad smiley face on the screen.                                                                                                                                                                                                 |
| <img src="/files/-M5812dbsuVMqpcwmSPm" alt="" data-size="original"> | [Background Color](/en/trik/programming-visual/blocks.md#background-color) | Set the screen background color.                                                                                                                                                                                                      |
| <img src="/files/-M5814kvOBCqnro2Pdw5" alt="" data-size="original"> |       [Print Text](/en/trik/programming-visual/blocks.md#print-text)       | Print the specified string at the specified location on the robot's screen. The default value of the "Text" property is interpreted as a pure string, so it will be displayed that way.                                               |
| <img src="/files/-M5818T918Net1_b0IuL" alt="" data-size="original"> |     [Clear Screen](/en/trik/programming-visual/blocks.md#clear-screen)     | Erase everything that is drawn on the screen.                                                                                                                                                                                         |

### Painter Color <a href="#painter-color" id="painter-color"></a>

![Painter Color](/files/-M587toEF8-BoaHIzvny)

Specify the color to draw simple graphical shapes on the robot's screen.

### Painter Width

![Painter Width](/files/-M587va0sqyrwp6gAlfd)

Specify the width of the line used to draw simple graphical figures on the robot's screen.

### Draw Pixel <a href="#draw-pixel" id="draw-pixel"></a>

![Draw Pixel](/files/-M587xh14MetvhWCPlAW)

Draw a dot on the screen at the specified coordinates.

### Draw Line <a href="#draw-line" id="draw-line"></a>

![Draw Line](/files/-M587zY89sIny2uEiT9H)

Draw a line segment on the screen. Segment ends are given as parameters to the block.

### Draw Rectangle <a href="#draw-rectangle" id="draw-rectangle"></a>

![Draw Rectangle](/files/-M5880LQSXqGtFcxaM63)

Draw a rectangle on the screen. The coordinates of the upper left corner, the width, and the height of the rectangle are specified as parameters.

### Draw Ellipse <a href="#draw-ellipse" id="draw-ellipse"></a>

![Draw Ellipse](/files/-M5882RNQ_qc7GRcY0aQ)

Draw an ellipse inscribed in a given rectangle on the screen.

### Draw Arc <a href="#draw-arc" id="draw-arc"></a>

![Draw Arc](/files/-M58860UAVYhHUnttrW6)

Draw an arc on the screen, given the coordinates of the rectangle in which it will be inscribed, and the angles (in degrees) of its beginning and end on the circle. If the beginning and the end coincide, the circle will be drawn.

### Smile <a href="#smile" id="smile"></a>

![Smile](/files/-M5888W2NZjgbWIXO_Ra)

Draw a smiley face on the screen.

### Sad Smile <a href="#sad-smile" id="sad-smile"></a>

![Sad Smile](/files/-M588AfNbHIM1rJapqM6)

Draw a sad smiley face on the screen.

### Background Color <a href="#background-color" id="background-color"></a>

![Background Color](/files/-M588GN40A8ngsrNEaso)

Sets the screen background color.

### Print Text

![Print Text](/files/-M588IPKZ_dNh7NmOk9-)

Prints the specified string at the specified location on the robot's screen.&#x20;

#### Properties

| Property | Value                                                                              |
| -------- | ---------------------------------------------------------------------------------- |
| Evaluate | <p>True — print the variable or expression value.</p><p>False — print as text.</p> |
| Text     | Text or variable/expression to be printed.                                         |
| Redraw   | <p>True — redraw the screen.<br>False — do not redraw.</p>                         |
| X, Y     | The text beginning coordinates.                                                    |

#### How to print a text?

To print a text:

1. Put your text into the Text property.
2. Uncheck the Evaluate checkbox.

#### How to print a variable value?

To print a variable value:

1. Put the variable name into the Text property.
2. Check the Evaluate checkbox.

### Clear Screen <a href="#clear-screen" id="clear-screen"></a>

![Clear Screen](/files/-M588KBGD8M1LWAwR_li)

Erase everything that is drawn on the screen.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.trikset.com/en/trik/programming-visual/blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
