How to print sensor values on the controller screen

Hi

I want to print my temp values for my drivetrain on the controller screen. However, this code only prints a string of text at the bottom of the screen.

  Controller1.Screen.clearScreen();
  Controller1.Screen.print("Left Front Temp", LeftF.temperature(percent));
  Controller1.Screen.print("Left Back Temp", LeftB.temperature(percent));
  Controller1.Screen.print("Right Front Temp", RightF.temperature(percent));
  Controller1.Screen.print("Right Back Temp", RightB.temperature(percent));

Any help would be appriciated

This is what I found on the VCS API
// Set the cursor (text starting point) to row 1, column 1
Controller1.Screen.setCursor(1,1);

// Print “HELLO!” on the first line
Controller1.Screen.print(“HELLO!”);

// Move the cursor to the next line then print
Controller1.Screen.newLine();
Controller1.Screen.print(“WORLD!”);

1 Like

You would have to do something like this:

Controller1.Screen.print("LF Temp: %d", LeftF.temperature(pct));
1 Like

I found it’s can’t used only this,should also use Controller1.Sreen.clearLine(1); in the first line on the while loop