Try putting all of the smartdashboard code you want to display:
Code:
SmartDashboard.putNumber("hmm", 2);
double k = sampleEncoder.getRate();
boolean what = sampleEncoder.getStopped();
String huh = sampleEncoder.getSmartDashboardType();
while (k>10){
String k2 = Double.toString(k);
double distance = sampleEncoder.getDistance();
String distance1 = Double.toString(distance);
SmartDashboard.putNumber(k2, k);
SmartDashboard.putNumber(distance1, distance);
SmartDashboard.putBoolean(huh, what);
Into the autonomousPeriodic() method.