rcx.test
Class SimpleWriteRead
java.lang.Object
rcx.test.SimpleWriteRead
public class SimpleWriteRead
- extends java.lang.Object
Simple Java Communications API Test Program:
This is a simple example of writing and reading from a comm port.
Additionally it will illustrate the following:
- Discovering all available serial ports and using the first one
(unless one is specified on the command line)
- How to use the USB port add-on on to the Java Communcations API
using the rcx.comm package.
(requires a specific port name on the command line e.g. LEGOTOWER1 )
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleWriteRead
public SimpleWriteRead()
main
public static void main(java.lang.String[] args)
getAvailableSerialPorts
public static java.util.Vector getAvailableSerialPorts()
ArrayToString
public static java.lang.String ArrayToString(byte[] message,
int length)