Hello List
I'm trying to build a simple vehicle which has two front wheels directly
driven by a motor (A/B) and a single auxiliary rear wheel (s). Looks
somewhat like this:
A --c-- B
|
|
|
s
Now, to make a really tight clockwise rotation around center c, I'd like
to move motor A forwards and motor B backwards, both at the same speed
and for the same distance. I've coded something like this:
package test;
import icommand.platform.nxt.*;
import icommand.nxtcomm.*;
public class Test {
public static void main(String[] args) {
Motor.A.setSpeed(15);
Motor.B.setSpeed(15);
int a = Motor.A.forward(1060, true);
int b = Motor.B.backward(1060);
NXTCommand.close();
}
}
However, the returnNow = true form of forward() doesn't seem to work as
I expect. It returns immediately, and I think it moves the right
distance, but the motor takes forever to spin up to the desired speed.
So if the program runs, the following happens:
- Motor B moves the given distance in a very short time
- Motor A begins slowly to spin up
- (much later) Motor A movement ends
- Motor A makes a subtle, high-pitched sound for some more time
I've tried this via Bluetooth from Mac and Windows, and with two
different NXT bricks. One of them had the 1.03 firmware, the other 1.01.
Behaviour was the same on both.
Do I need to do more RTFM or is something with forward(long, boolean)
not working properly?
Thanks for your time
Christian
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Lejos-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lejos-discussion