i am using eclipse with plugin and lejos 0.9.0 beta. in the following programm the compiler gives the error:
the "constructor Motor(MotorPort) is undfined" and then so on. it doesn´t matter to compile out eclispe or in the command box. i think all the enviroment varialbe are set accurately.
import lejos.nxt.*;
class Quadrat {
Motor motorA = new Motor(MotorPort.A);
Motor motorB = new Motor(MotorPort.B);
Quadrat() throws Exception {
int i = 0;
while (i < 4) {
motorA.setSpeed(300);
motorA.forward();
motorB.setSpeed(300);
motorB.forward();
Thread.sleep(5000);
motorA.stop();
motorB.stop();
motorA.rotate(-180, true);
motorB.rotate(180);
i++;
}
motorA.stop();
motorB.stop();
}
public static void main(String[] args) throws Exception {
new Quadrat();
}
}
thanx for answers,
hannes
