My programm code && 1 question
import lejos.nxt.*;
import lejos.navigation.*;
public class Linie
{
public static TachoNavigator nav = new TachoNavigator(5.5f,11.2f);
public static LightSensor light = new LightSensor(SensorPort.S2);
public static void main (String[] aArg)
throws Exception
{
Motor.A.regulateSpeed(true);
Motor.C.regulateSpeed(true);
Motor.A.setSpeed(600);
Motor.C.setSpeed(600);
Button.ENTER.waitForPressAndRelease();
String l = "Light:";
String p = "Press ENTER";
vor();
}
public static void rotierenLinks()
{
nav.rotate(2);
}
public static void rotierenRechts()
{
nav.rotate(-2);
}
public static void vor()
{
boolean status = true;
light.setFloodlight(true);
while (status == true )
{
nav.forward();
if (50 <= light.readValue())
{
nav.stop();
int x = 0;
while((41 <= light.readValue()) && (x<=10) )
{
rotierenLinks();
x++;
}
if(50 <= light.readValue() )
{
while (41 <= light.readValue())
{
rotierenRechts();
}
}
}
/* if (31 == light.readValue())
{
nav.stop();
status = false;
}
*/
}
}
}
As I used your old alpha, my while loop was ok but now with the new release my nxt is very slow with rotate..
How can I solve this problem?
In addition I true useless to create a timer object

maybe you can show me an example?
--------------
Sorry 4 my bad English (German)