# Programming Motor Telemetry

## Motors and Telemetry&#x20;

Recall that **telemetry** is the process of collecting and transmitting data. There is a lot of useful information our motors could send back to us, but to start let's have it output the power based on the joystick's movement.&#x20;

Similar to what we did for our servo program, let's add a <img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4_pJHI8HTuZFQTNfcy%2F-MWACJyDlnpPjKwQvDeW%2F-MWBJfpbTuatRMfbhnlO%2FTelemetry%20-%20key%20and%20number.svg?alt=media&#x26;token=d6f21b70-8197-4ead-954a-2604cfb72155" alt="" data-size="original"> block from the telemetry menu to the end of our ![](https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FsMxAYosVLbBf6uo556ne%2Fimage.png?alt=media\&token=dbbdac98-7038-4728-8d31-a4c3b27bb83d) loop:

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2F5JRmbcqlbs5RDxH8oSrY%2Fmotortelemetry.PNG?alt=media&#x26;token=26254ded-006f-4d0c-84c4-fcba86693d59" alt=""><figcaption></figcaption></figure>

From the DcMotor menu pullout the ![](https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2F7eAy59YQEi3NVlJuH7A1%2Fimage.png?alt=media\&token=0a3fe024-9e1d-49bd-97c4-13b9d669049a) block . Drag the block and attach it to the number **parameter** on the telemetry blocks.&#x20;

Change the key parameter to "Motor Power"&#x20;

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FH2cfrOH7dYFsGyj8PsxM%2Fmotorpower.png?alt=media&#x26;token=2d94e797-1ba3-46c0-af39-33ac8f800de3" alt=""><figcaption></figcaption></figure>

When the OpMode is run the telemetry block will display the current power based on the joysticks movement. Give it a try!

## Full Program

<figure><img src="https://1359443677-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUOOiQ4S2QcMWmVoSmeQ8%2Fuploads%2FDeQ4G6tpGK3xFRwgUuGB%2Fmotorfull.png?alt=media&#x26;token=da765ec4-949a-4a79-9173-29e91cb696fd" alt=""><figcaption></figcaption></figure>
