Tech Toolbox
  • Please Visit https://ftc-tech-toolbox.vercel.app/ for the new tech toolbox!!
    • Introduction
    • Choosing an IDE
    • Creating an OpMode
    • Motors and Encoders
    • Servos
    • Gamepad Controls
    • Drive Systems
    • Lynx Modules
    • Telemetry
    • Wireless Download
    • The Sleep Command
  • Please Visit the New Link
    • Tank Drive / Skid Steer (Part 1)
    • Mecanum Drive (Part 1)
    • Turrets
    • Linear Slides
    • Kicker
    • Active Intake / Sweepers
    • Flywheels / Shooters
  • Please Visit the new Link
    • Base Class (Step 1)
    • Module Classes (Step 2)
    • OpMode Classes (Step 3)
  • This domain is now depreciated and is no longer updated!
  • This domain is now depreciated and is no longer updated!
    • What is Localization?
    • General Odometry Logic
    • Tank (No Deadwheels)
    • Mecanum (No Deadwheels)
    • Deadwheel Odometry (Mecanum and Tank)
    • VSLAM
  • This domain is now depreciated and is no longer updated!
    • What is Control Theory?
    • Custom PID Loops
    • Essential Control Theory Concepts
    • Resources for Learning Advanced Control Theory
  • This domain is now depreciated and is no longer updated! Please visit this domain for the new TT!
    • Introduction
    • Mecanum Drive (Part 2)
    • Tank Drive (Part 2)
    • Introduction to Pure Pursuit
    • Pure Pursuit: Mecanum
    • Pure Pursuit: Tank
    • Advanced Pure Pursuit
    • Guided Vector Fields
    • Autonomous Movement Libraries
  • Sensors
    • IMU
    • Color Sensors
      • Advanced Sensing Code
    • Distance Sensors
    • Touch Sensor
  • Computer Vision
    • Setting up Camera/Intro to Computer Vision Tools
      • Intro to OpenCV
      • Vuforia
    • Streaming Frames
    • Color Thresholding
    • April Tags
    • Linear Regression
    • Machine Learning Toolchain
    • Object Distance Estimation
    • Object Tracking / Driving to an Object
    • Computer Vision Simulators
  • Simulators
    • Beta8397 Simulator
    • VRS
  • Cool Codebases
Powered by GitBook
On this page
  • Adding a Line
  • Adding Data
  • Using a Variable
  • Updating Telemetry
  • Telemetry in an OpMode
  • Transmission Time
  1. Please Visit https://ftc-tech-toolbox.vercel.app/ for the new tech toolbox!!

Telemetry

Outputting Text to the Driver Station

PreviousLynx ModulesNextWireless Download

Last updated 1 year ago

Prerequisites

When programming in FTC, telemetry can be used to display messages on the driver station. It can be very useful as it can help easily identify issues or unusual readings with your robot.

Adding a Line

A new telemetry line can be created using the addLine() method which takes in a string as a parameter to display. It can be displayed above some data to categorize it.

telemetry.addLine("Sensor Info");

Adding Data

Using the addData() method will allow you to display a specific data value to the driver station along with a string caption.

telemetry.addData("Position", 1);

Using a Variable

Oftentimes, telemetry is used to display a variable related to a motor or servo to show information about how it is running. To do this, you should use addData() and use a variable for the second parameter.

int position;
position = motor.getCurrentPosition();
telemetry.addData("Motor Pos", position);

Updating Telemetry

After adding the telemetry line or data, it will not actually show up on the driver station unless you use telemetry.update() after it to update.

telemetry.addData("Position", 1);
telemetry.update();

Telemetry in an OpMode

Usually, teams use teleop once after all initialization code to show everything has been initialized, and have different telemetry show in loops during their opmodes, here is an example of telemetry in a Linear OpMode.

@TeleOp(name = "TeleOp)
public void RoboTele extends LinearOpMode{
    @Override
    public void runOpMode() throws InterruptedException {
        //All initialization code
        telemetry.addLine("Robot Initialized");
        telemetry.update(); //Update once
        
        waitForStart();
        
        while(opModeIsActive){
            //Teleop Functions
            
            
            telemetry.addData("Data", 3);
            telemetry.update(); //Updates each teleop cycle
        }
    }
}

Transmission Time

You can also change how often telemetry updates or refreshes on the driver station screen if you want to change it from the default.

//Parameter is # of milliseconds between updates
telemetry.setMsTransmissionInterval(200);
Creating an OpMode