System.out.println("Velocity: " + (int) velocity);
// Move the robot
pilot.setMoveSpeed((float) Math.abs(velocity));
if (velocity > 0) pilot.backward();
else pilot.forward();
Thread.sleep(1000);
pilot.stop();
// Take a reading
float range = sonic.getRange();