Search found 14 matches

by hyderabat
Sun Nov 13, 2011 8:51 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

Re: rotate() doesn't work (!)

After I changed a few things, I run the program on the NXT, and it worked perfectly. Thanks a ton for it, I could alter my own program following the general syntax of your program, and it works perfectly now :-) Finally, my bloody school project is running... Thanks everyone for your help!!!
by hyderabat
Thu Nov 10, 2011 9:06 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

Re: rotate() doesn't work (!)

Please, has anyone an idea? I would be really, really greatful. It is for a school project, and I can't get any further on my own as I am just getting to know LeJOS... Here again the code in the main-file: try { RegulatedMotorListener Listener = new MotorListener(); for (int i = 0;i<3;i++) {mR[i].ad...
by hyderabat
Mon Nov 07, 2011 9:23 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

Re: rotate() doesn't work (!)

You're right, the mistake came from previous code... But it doesn't change anything :-(

Exception is class 16 -> still NullPointerException

BTW: In order to get the class MotorListener to the NXT, I just added an empty main()-loop below... can I do that?
by hyderabat
Mon Nov 07, 2011 7:01 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

Re: rotate() doesn't work (!)

So, first, I have to use the class, looking like that: package TestingArea; import lejos.robotics.RegulatedMotorListener; import lejos.robotics.RegulatedMotor; public class MotorListener implements RegulatedMotorListener{ @Override public void rotationStarted(RegulatedMotor arg0, int arg1, boolean a...
by hyderabat
Sun Nov 06, 2011 8:08 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

Re: rotate() doesn't work (!)

I tried the following thing, just like Dominik said: import lejos.nxt.*; import lejos.nxt.remote.*; import lejos.nxt.comm.Bluetooth; import lejos.nxt.remote.RemoteNXT; import lejos.robotics.RegulatedMotor; import lejos.robotics.RegulatedMotorListener; public class TestIt { public static RemoteMotor ...
by hyderabat
Sun Nov 06, 2011 7:08 pm
Forum: NXJ Software
Topic: rotate() doesn't work (!)
Replies: 9
Views: 1361

rotate() doesn't work (!)

Hi I am really frustrated by now. I spent hours searching for an error, but I just can't find it. I have separated the problem code from the rest and made an own program with it: public static RemoteMotor [] mR; public static NXTRegulatedMotor [] m = {Motor.A,Motor.B,Motor.C}; /** * @param args */ p...
by hyderabat
Sat Nov 05, 2011 12:17 pm
Forum: NXJ Software
Topic: rotateTo() problem
Replies: 5
Views: 1078

Re: rotateTo() problem

Thanks for the suggestion. By the way, won't run, as it needs NXTRegulatedMotor m instead of "Motor m"... but I am using RemoteMotor as well, so I can't use this method. And isn't that just simply easier and faster: for (int i = 0;i<3;i++){ //lets put all the legs up (Position: 0) m[i].sto...
by hyderabat
Fri Nov 04, 2011 1:37 pm
Forum: NXJ Software
Topic: rotateTo() problem
Replies: 5
Views: 1078

Re: rotateTo() problem

Okay, so for everyone with the same Problem, this is what I did to make it work: int [] Number = new int[6]; int [] Rest = new int[6]; for (int i = 0;i<3;i++) { m[i].stop(); Number[i] = m[i].getPosition()/360; Rest[i] = m[i].getPosition() - Number[i]*360; m[i].rotate(360 - Rest[i],true); } If anyone...
by hyderabat
Fri Nov 04, 2011 1:19 pm
Forum: NXJ Software
Topic: rotateTo() problem
Replies: 5
Views: 1078

Re: rotateTo() problem

Ok, so I figured out with a simple test program that it just simply goes aaaaaaaaaaall the way back to the original position. I just want to have it in the same position, but not after it turned back for ages. Isn't it possible to set 0 as a special point on the circle and then just go back to this ...
by hyderabat
Fri Nov 04, 2011 1:03 pm
Forum: NXJ Software
Topic: rotateTo() problem
Replies: 5
Views: 1078

rotateTo() problem

Hi I got a problem with the rotateTo()-method. What I am doing: Turning the motors. Stopping the motors. Resetting the tachometer with Motor.A.resetTachoMeter(). Turning the motors. Stopping the motors. Tell them to go to the ordered position (in my case 0). The problem is that they just continue sp...
by hyderabat
Fri Nov 04, 2011 10:40 am
Forum: NXJ Software
Topic: Connection to remote device
Replies: 2
Views: 510

Re: Connection to remote device

I solved it now with the Name: try { String blueadd = remo.getBrickName(); blueadd = blueadd.substring(0,4); LCD.drawString(blueadd,0,2); String name = remo.getBrickName().substring(0,4); LCD.drawString(name,0,3); if (blueadd.equals(name)) LCD.drawString("CORRECT!", 0, 4); else LCD.drawStr...
by hyderabat
Fri Nov 04, 2011 10:25 am
Forum: NXJ Software
Topic: Connection to remote device
Replies: 2
Views: 510

Connection to remote device

Hi everyone I am trying to remotely control one NXT from another one. For this reason, I would like to periodically check if the connection still exists. That is why I am using the code down there: try { String blueadd = remo.getBluetoothAddress(); LCD.drawString(blueadd,0,2); if (blueadd == remo.ge...
by hyderabat
Sun Oct 16, 2011 2:18 pm
Forum: NXJ Software
Topic: Javadoc Attachement in Eclipse
Replies: 6
Views: 2455

Re: Javadoc Attachement in Eclipse

viewtopic.php?f=7&t=2838

This solved my problems (and also the one that you have to restart Eclipse each time...)
by hyderabat
Sun Oct 16, 2011 12:52 pm
Forum: NXJ Software
Topic: Javadoc Attachement in Eclipse
Replies: 6
Views: 2455

Javadoc Attachement in Eclipse

In Eclipse, when I try to attach the Javadoc (C:\Users\Administrator\leJOSNXJProjects\classes\doc) to the project via Properties/Java Built Path/ , even if it says its "likely to be valid", it immediatelly disappears afterwards as soon as I click OK. I get the same result with the online A...

Go to advanced search