# Programming Servo Telemetry

## What is Telemetry?&#x20;

**Telemetry** is the process of collecting and transmitting data.  In robotics ,telemetry is used to output internal data from the actuators and sensors to the Driver Hub. It is a way for the robot to communicate back to you the programmer what the robot thinks its doing or seeing. This information can then be used to improve your code, make adjustments to a mechanism, or to strategize when driving around the field if competing.&#x20;

Telemetry blocks in Blocks can be found under the Utilities dropdown menu:

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FYWCJuOSgirS6f67ExDHt%2Fimage.png?alt=media&#x26;token=d1218c4d-7a4f-4022-a550-1d494f55a1fb" alt=""><figcaption></figcaption></figure>

## Using Telemetry with Servos

The most useful telemetry from the servo is the position of the servo along its 270° range.&#x20;

From the telemetry menu, select the <img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4_pJHI8HTuZFQTNfcy%2F-MWACJyDlnpPjKwQvDeW%2F-MWBCD-8cdq6zfjWEnDn%2FTelemetry%20-%20key%20and%20number.svg?alt=media&#x26;token=bbc24af7-4844-414c-bcc6-fa0ed1ba1efe" alt="" data-size="original"> block. &#x20;

Drag the <img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4_pJHI8HTuZFQTNfcy%2F-MWACJyDlnpPjKwQvDeW%2F-MWBCD-8cdq6zfjWEnDn%2FTelemetry%20-%20key%20and%20number.svg?alt=media&#x26;token=bbc24af7-4844-414c-bcc6-fa0ed1ba1efe" alt="" data-size="original"> block and place it beneath the **if/else if** block set. In this scenario, we want our telemetry to be constantly providing output rather than waiting for a designated check.&#x20;

From the Servo menu pullout the block <img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4_pJHI8HTuZFQTNfcy%2F-MWACJyDlnpPjKwQvDeW%2F-MWBETk3wvRYKbvYxj0p%2FServo%20-%20servo%20value.svg?alt=media&#x26;token=a3e33f56-9b3e-461d-888c-dfe234296d47" alt="" data-size="original"> Drag the Block and attach it to the number parameter on the telemetry blocks.&#x20;

{% hint style="info" %}
For the ![](https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FkDT8N49w0EutjA9Gyb0O%2Fimage.png?alt=media\&token=31eee18f-f755-4914-959b-0e8a8e15e44f)block "key" is a text box we are able to change to help define what the value is being read out to the Driver Hub's screen. Think of it like an answer key or one used on a map to identify symbols.

Only certain blocks can be added to the second parameter based on what is being requested. In this case the parameter number means the data must be a numeric value.
{% endhint %}

Change the key parameter to "Servo Position"&#x20;

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2F1DAdSpQV1wl30KKaoV5p%2Fimage.png?alt=media&#x26;token=28ee6615-5068-4795-8d1c-c62df0fbf7c8" alt=""><figcaption></figcaption></figure>

Give your program a go!

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FcKxRMrPc5M6tHcFyabA0%2Ffullservo.png?alt=media&#x26;token=b4fa6326-7671-4dce-a408-3a8187bfd8be" alt=""><figcaption></figcaption></figure>


---

# 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://docs.revrobotics.com/duo-control/hello-robot-blocks/part-1/programming-servos/programming-servo-telemetry.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.
