Update Sample.java

Check to make sure the controller is connected