updateSensorsPause

The time to wait in milliseconds after sending sensors command before
attempting to read

port

public gnu.io.SerialPort port

The RXTX port object, normally you don't need access to this

input

public java.io.InputStream input

the serial input stream, normally you don't need access to this

output

public java.io.OutputStream output

the serial output stream, normally you don't need access to this

flushOutput

public boolean flushOutput

RXTX bombs when flushing output sometimes, so by default do not
flush the output stream. If the output is too buffered to be
useful, do:
roombacomm.comm.flushOutput = true;
before using it and see if it works.

waitForDSR

public boolean waitForDSR

Some "virtual" serial ports like Bluetooth serial on Windows
return weird errors deep inside RXTX if an opened port is used
before the virtual COM port is ready. One way to check that it
is ready is to look for the DSR line going high.
However, most simple, real serial ports do not do hardware handshaking
so never set DSR high.
Thus, if using Bluetooth serial on Windows, do:
roombacomm.waitForDSR = true;
before using it and see if it works.

Constructor Detail

RoombaCommSerial

public RoombaCommSerial()

RoombaCommSerial

public RoombaCommSerial(boolean autoupdate)

RoombaCommSerial

public RoombaCommSerial(boolean autoupdate,
int updateTime)

Method Detail

isPortInUse

public static boolean isPortInUse(java.lang.String pname)

Let you check to see if a port is in use by another Rooomba
before trying to use it.

connect

public boolean connect(java.lang.String portid)

Connect to a serial port specified by portid
doesn't guarantee connection to Roomba, just to serial port

computeSensors

public void computeSensors()

called by serialEvent when we have enough bytes to make sensors valid

listPorts

public java.lang.String[] listPorts()

If this just hangs and never completes on Windows,
it may be because the DLL doesn't have its exec bit set.
Why the hell that'd be the case, who knows.
FIXME: deal more gracefully
(from processing.serial.Serial)