Hi,
I'm fairly new to lejos and java both. Below is a simple program I wrote
and I'm just messing around with different classes getting a feel for
everything. When the program is done it should quit running. It looks
like its still going on because the minifigs legs are in the walking
position. I have to press run then press on to get the program to stop.
Am I missing something? I also tried sticking return at the end of main
like you would in C but I got the same result.

import josx.platform.rcx.*;
import josx.robotics.RotationNavigator;
//import LejoEx.ActiveMpx.*;

class RNav
{
        public static void main(String [] args)throws
InterruptedException
        {
                Motor.A.setPower(7);
                Motor.C.setPower(7);
                //LejoEx.ActiveMpx.selectCh1(Sensor.S3); // 3rd rcx port
1st mux port
                Sensor.S1.setTypeAndMode (4, 0xE0);
                Sensor.S3.setTypeAndMode (4, 0xE0);
                RotationNavigator Trucks = new RotationNavigator(2.5f,
37.5f, 5f);
        
                //Trucks.travel(5);
                Trucks.forward();
                Thread.sleep (5000);
                Trucks.backward();
                Thread.sleep (5000);
                Trucks.stop();
                Sound.beepSequence();
        }
}




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion

Reply via email to