Advertisement
crackanddie

Move back for 10 seconds Robocad

Aug 16th, 2023
861
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. public class Main {
  2.     public static void main(String[] args) throws InterruptedException {
  3.         RobocadVMXTitan robot = new RobocadVMXTitan(false);
  4.  
  5.         long startTime = System.currentTimeMillis();
  6.         // едет 10 секунд назад
  7.         while (System.currentTimeMillis() - startTime < 10000){
  8.             robot.setMotorSpeed0(30);
  9.             robot.setMotorSpeed1(-30);
  10.         }
  11.  
  12.         robot.setMotorSpeed0(0);
  13.         robot.setMotorSpeed1(0);
  14.  
  15.         Thread.sleep(100);
  16.         robot.stop();
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement