You can also use this code to print to the dashboard on the Classmate or another PC. Here is an example:
PHP Code:
public void printToClassmate(){
DriverStationLCD driverStation = DriverStationLCD.getInstance();
driverStation.println(DriverStationLCD.Line.kUser2, 1, "Left Speed: " + Double.toString(leftEncoder.getRate()));
driverStation.println(DriverStationLCD.Line.kUser3, 1, "Right Encoder: " + Double.toString(rightEncoder.getDistance()));
driverStation.println(DriverStationLCD.Line.kUser4, 1, "Axis output: " + Double.toString(leftStick.getRawAxis(4)));
//driverStation.println(DriverStationLCD.Line.kUser5, 1, "URF: " + Double.toString(ultra.getRangeInches()));
//driverStation.println(DriverStationLCD.Line.kUser4, 1, "Gyro angle: " + Double.toString(gyro.getAngle()));
driverStation.updateLCD();
}
Just make sure to change kUser after every line because that is the line number it prints on, and call this method in your main While loop.