The error is : The import lejos.navigation.TachoNavigator conflicts with a type defined in the same file.
My code is below:
- Code: Select all
import lejos.navigation.TachoNavigator;
import lejos.nxt.Button;
import lejos.nxt.Motor;
public class TachoNavigator {
public static void main(String[] args) {
TachoNavigator tacho=new TachoNavigator(5.6F,12F,Motor.B,Motor.A);
tacho.setSpeed(500);
while(true)
{
tacho.forward();
tacho.stop();
Button.ENTER.waitForPressAndRelease();
tacho.rotate(90);
Button.ENTER.waitForPressAndRelease();
}
}
}
