> For the complete documentation index, see [llms.txt](https://help.trikset.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.trikset.com/en/trik/programming-code.md).

# TRIK controller programming in Python and JavaScript

{% hint style="info" %}
This article is automatically translated from Russian by Google Translator.
{% endhint %}

## Creating a text program

Read the article about creating a new text program and generating a diagram to code:

{% content-ref url="/pages/-M0Npt6Rsejz5XCUWJsR" %}
[Textual programming](/en/studio/programming-code.md)
{% endcontent-ref %}

## Programming in Python and JavaScript

The functionality of the runtime environment is accessed through predefined objects and functions.

### Objects

| Object                                                     | Description                                                                                                      |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [brick](/en/trik/programming-code/object-brick.md)         | Represents the TRIK controller and provides access to the robot's devices.                                       |
| [script](/en/trik/programming-code/object-script.md)       | Represents methods of controlling the execution of the script and provides access to operating system functions. |
| [mailbox](/en/trik/programming-code/object-mailbox.md)     | It implements communication between robots in the network by means of the mailbox mechanism.                     |
| [gamepad](/en/trik/programming-code/object-gamepad.md)     | Serves to work with the remote control.                                                                          |
| [Threading](/en/trik/programming-code/object-threading.md) | Provides management of parallel threads.                                                                         |

### Functions

| Function                                                         | Description                                                                                                                                                                                                            |
| ---------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [getPhoto](/en/trik/programming-code/function-getphoto.md)       | Returns a one-dimensional array of bytes containing the pixels of the rgb32-formatted image taken from the camera.                                                                                                     |
| [include(“path”)](/en/trik/programming-code/function-include.md) | Allows you to use functions implemented by the user in other files. It is assumed for writing your own libraries. As a passed parameter you must specify the full system path to the file with the required functions. |
