Telemetry
Telemetry allows your robot to send information back to the Driver Station.
It is one of the most useful debugging tools in FTC.
You can use telemetry to view:
- Sensor values
- Motor power
- Encoder positions
- Robot states
- Variable values
addData()
addData() displays a value with a label.
telemetry.addData("Power", motorPower);Example output:
Power: 0.75You can display multiple values:
telemetry.addData("Left Motor", leftPower);
telemetry.addData("Right Motor", rightPower);addLine()
addLine() displays plain text.
telemetry.addLine("Robot Ready");update()
Telemetry does not appear immediately.
You must call update() to send the data.
telemetry.update();Example:
telemetry.addData("Position", encoderPosition);
telemetry.update();Debugging with Telemetry
Telemetry is useful for finding problems.
Example:
telemetry.addData("Joystick", gamepad1.left_stick_y);
telemetry.addData("Motor Power", motor.getPower());
telemetry.update();This helps you check if:
- Inputs are being read
- Motors are receiving power
- Sensors are returning values
Displaying Robot States
Telemetry is commonly used with state machines.
telemetry.addData("State", currentState);
telemetry.update();Example:
State: INTAKINGKey Takeaways
- Telemetry displays information on the Driver Station.
- Use
addData()for values. - Use
addLine()for messages. - Always call
update(). - Telemetry is essential for debugging.
Was this resource helpful?
