} catch (InterruptedException e){}
leftMotor.setValue(FORWARD);
rightMotor.setValue(REVERSE);
try {
Thread.sleep(3000);
} catch (InterruptedException e){}
leftMotor.setValue(STOP);
rightMotor.setValue(STOP);
}
/**************PATTERN 2 (TBD PATTERN )***************************/
/* This function sends the commands to move through pattern2 */
public void doPattern2() {
}
/***********************************************************************/
/*This section handles exceptions to the program */
public void terminate(){
try {
sock.close();
}
catch (Exception ex) {}
System.exit(0);
}
public static void main(String args[]){
if (args.length != 1) {
System.err.println("usage: java RobotControl <ip address>");
System.exit(0);
}
RobotControl url = new RobotControl(args[0]);
url.setVisible(true);
}
}
Comentarios a estos manuales