Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. package com.mydomain;
  2. import lejos.nxt.*;
  3.  
  4.  
  5. public class wheels2 {
  6. static LightSensor light = new LightSensor(SensorPort.S3);
  7. /**
  8. * @param args
  9. */
  10. public static void main(String[] args) throws InterruptedException
  11. {
  12.  
  13. MotorPort motor1 = MotorPort.A;
  14. MotorPort motor2 = MotorPort.B;
  15. motor1.resetTachoCount();
  16. motor1.controlMotor(80,1);
  17.  
  18. double N = ( 2*3.63*360);
  19.  
  20. while (motor1.getTachoCount() < N)
  21. {
  22. Thread.sleep(100);
  23. }
  24.  
  25.  
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement