# Testing devices connected to the TRIK controller

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

On the TRIK controller you can test the devices connected to it:

1. Analog sensors
2. Servo motors
3. Power motors
4. Digital sensors
5. Encoders
6. Gyroscope
7. Accelerometer
8. Camera

To do this, go to the Test menu.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkicC1XJ8M7JuVJV7S%2F83%201%20En%20TRIK-Testg.png?alt=media\&token=43f36f06-a605-4f44-ba96-2e38777b0338)

{% hint style="info" %}
**Warning!** The device must first be connected to a specific port to test it. To test the device, you must first connect it to a specific port.
{% endhint %}

## Analog sensors

To start testing analog sensors, select the corresponding item in the list.

| ![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkik8eH9s5J5cqfE8e%2F83%202%20En%20TRIK-Testg-Analjg.png?alt=media\&token=4c097a61-f243-4f8d-b77f-278ddd447bdc) | ![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkionAVrg3e0SWUeTD%2F83%203%20En%20TRIK-Testg-Analjg2.png?alt=media\&token=e159045c-62f9-4cf2-8481-623a892c5ba4) |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### Configuration of ports for analog sensors

| Port  | Configuration                |
| ----- | ---------------------------- |
| A1–A2 | <p>Infrared distance sensor. |

</p><p>Value limits: 8-80 cm.</p>                                                                                            |
| A3–A4 | <p>Touch sensor. Values: </p><p>0 - no touch, </p><p>1 - pressing.</p>                                                                                  |
| A5–A6 | <p>Light sensor. </p><p>Value limits: 0-100. 0 - white, 100 - black. </p><p>The sensor must be installed at a distance of 8-15 mm from the surface.</p> |

## Servo motors

1\. To start a servo test, select the corresponding item in the list.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkj-63DKScP1C9-jRu%2F83%204%20En%20TRIK-Testg-Servo.png?alt=media\&token=77be3931-18d5-4baa-a4d1-e2086b7e49b2)

2\. Select the port to which the servo drive is connected. The servo drives are connected to ports S1-S3.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkj61csH1p9onemzoh%2F83%205%20En%20TRIK-Testg-Servo2.png?alt=media\&token=d3159e1c-ba1b-48a2-93de-6db13d1d4681)

3\. Press the "Enter" button on the controller to apply power to the servo drive.

4\. If you add power with the "Right" button, the servo will rotate clockwise.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjAaRCuCo6mI_PfdB%2F83%206%20En%20TRIK-Testg-Servo3.png?alt=media\&token=896fd36a-dbaf-4374-9957-f0c59b6ef780)

5\. If you turn it down, it's counterclockwise.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjF97yvp1Hs7rFy-s%2F83%207%20En%20TRIK-Testg-Servo4.png?alt=media\&token=3c5eeb75-0398-430b-8035-545f5867d9f5)

## Power motors

1\. To start the power motor test, select the corresponding item in the list.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjKC84owqZ1SGQDHE%2F83%208%20En%20TRIK-Tesng-Motors.png?alt=media\&token=11eb99a8-0bda-4940-a18e-033ed6f4b248)

2\. Select the port to which the motor is connected. The motors are connected to ports M1-M4.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjONQePnzXUlOyt0m%2F83%209%20En%20TRIK-Tesng-Motors2.png?alt=media\&token=16d8441b-8c3d-4c4e-8f7f-9460f85afc71)

3\. Press the "Enter" button on the controller to apply power to the motor.

4\. If you add power with the "Right" button, the motors will spin forward.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjSeQNV32cqRQPulK%2F83%20A%20En%20TRIK-Tesng-Motors3.png?alt=media\&token=d1b5427b-76ef-4372-a509-d17d3822ee04)

5\. If you turn it down, back up.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjWHAVqpNLZz1N3jL%2F83%20B%20En%20TRIK-Tesng-Motors4.png?alt=media\&token=4ae88a02-2627-405d-b612-5d14c1691e72)

{% hint style="info" %}
**Warning!** If the motor rotates in the wrong direction, just change the direction of the current, disconnect the power wire and insert the other side.
{% endhint %}

## Digital sensors

To start testing digital sensors, select the corresponding item in the list.

| ![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjd0ejiFsRzYmdX-R%2F83%20C%20En%20TRIK-Testg-Digit.png?alt=media\&token=b99a8746-7c8b-488b-b706-0c98b2703097) | ![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjgpKg8zNxWI__c7j%2F83%20D%20En%20TRIK-Testg-Digit2.png?alt=media\&token=3d1d9226-0e33-4706-9e1d-8cdde93d8640) |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

### Configuration of ports for digital sensors

| Port  | Configuration                  |
| ----- | ------------------------------ |
| D1–D2 | <p>Ultrasonic distance sensor. |

</p><p>Value limits: 8-250 cm.</p> |

{% hint style="info" %}
**Warning!** If the sensor reads -1, then it is either too far away from the object or too close to it.
{% endhint %}

## Encoders

1\. To start the encoder test, select the corresponding item in the list.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjpIl2SGR1tz50DIa%2F83%20E%20En%20TRIK-Testg-Enc.png?alt=media\&token=a29e6efc-7cef-4cac-b4c5-5f67bfe7ce56)

2\. Connect the wheels to the motors with a bushing.

3\. To test the performance of the encoder, rotate the wheel back and forth and watch the encoder readings change.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkjunEO0-0kBhrL628%2F83%20F%20En%20TRIK-Testg-Enc2.png?alt=media\&token=cced1c07-37f1-41db-8d4a-309fc13d9ba4)

{% hint style="info" %}
**Warning!** Encoders are incremental. When scrolling the motor the encoder value can be either negative or positive.
{% endhint %}

## Gyroscope

1\. To start the gyroscope test, select the corresponding item in the list.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkk6N5f4-GhpeA2GUu%2F83%20G%20En%20TRIK-Tesng-Gyro.png?alt=media\&token=4e18607d-f07e-4390-b4ff-12da6724ad86)

2\. To test the performance of the gyroscope, change the position of the robot in space and see if the readings change.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkkUVQI1EGQ-_L5-Uy%2F83%20H%20En%20TRIK-Tesng-Gyro2.png?alt=media\&token=07f41a30-3231-4fb6-bc84-916ab2ae19bc)

{% hint style="info" %}
**Warning!** All readings are in milligrades.
{% endhint %}

## Accelerometer

1\. To start the gyroscope test, select the corresponding item in the list.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkk_wrxnv-a-g5ukLP%2F83%20I%20En%20TRIK-Tesng-Axel.png?alt=media\&token=2ca378f1-9daf-4d41-a5ff-01f2f18193d8)

2\. To test the performance of the accelerometer, change the position of the robot in space and see if the readings change.

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkkhBOGK6KvhzcGbbN%2F83%20J%20En%20TRIK-Tesng-Axel2.png?alt=media\&token=05e6886e-cc11-42b8-9f6f-3c6adefa3639)

{% hint style="info" %}
**Warning!** All readings are in milligrades.
{% endhint %}

## Camera

![](https://2483351831-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-9YMGCK0ySSnTAiseS%2F-MSjlXHus0xHFY-n686V%2F-MSkl-Mhj_46g2ob0AYh%2F83%20K%20En%20TRIK-Tesng-Cam.png?alt=media\&token=028d8efb-9f5f-473e-9e47-492e58d160a8)

If the camera is working properly, it should display an image on the screen.
