NXTComm Library Problem...
in
Contributed Library Questions
•
10 months ago
I'm currently using Processing 2.0b7 and was trying to control my NXT using processing. The problem is as follows -
NullPointerException (at - nxt.resetMotorPosition(1, true);)
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version = RXTX-2.1-7
[0] "/dev/tty.HUAWEIMobile-Modem"
[1] "/dev/cu.HUAWEIMobile-Modem"
[2] "/dev/tty.HUAWEIMobile-Diag"
[3] "/dev/cu.HUAWEIMobile-Diag"
[4] "/dev/tty.HUAWEIMobile-Pcui"
[5] "/dev/cu.HUAWEIMobile-Pcui"
[6] "/dev/tty.Bluetooth-PDA-Sync"
[7] "/dev/cu.Bluetooth-PDA-Sync"
[8] "/dev/tty.Bluetooth-Modem"
[9] "/dev/cu.Bluetooth-Modem"
[10] "/dev/tty.N-3-DevB"
[11] "/dev/cu.N-3-DevB"
RXTX Warning: Removing stale lock file. /var/lock/LK.017.018.010
gnu.io.PortInUseException: Unknown Application
at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
at pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannel.openPort(NXTCommBluetoothSerialChannel.java:87)
at pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannel.<init>(NXTCommBluetoothSerialChannel.java:54)
at pt.citar.diablu.processing.nxt.LegoNXT.<init>(LegoNXT.java:148)
at mindstorms_jeep.setup(mindstorms_jeep.java:64)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)
NXTComm for Processing, beta version 0.91 by Jorge Cardoso
Exception in thread "Animation Thread" java.lang.NullPointerException
at pt.citar.diablu.nxt.brick.NXTMotor.resetMotorPosition(NXTMotor.java:256)
at pt.citar.diablu.processing.nxt.LegoNXT.resetMotorPosition(LegoNXT.java:341)
at mindstorms_jeep.setup(mindstorms_jeep.java:67)
at processing.core.PApplet.handleDraw(PApplet.java:2117)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:193)
at processing.core.PApplet.run(PApplet.java:2020)
at java.lang.Thread.run(Thread.java:680)
1