I’m trying to do a simple slider-dimmer interface written in Java, and I don’t want to screw around with a separate library. My firmware reads in a single byte and sends it right to the PWM output.
In any case, on UNIXen (all I care about) I should just be able to open the serial port device file, and read/write to it with no trouble.
My problem is with opening the device file in Java. The code hangs on the FileOutputStream - but it doesn’t crash.
Here’s the relevant code:
System.out.println("Opening tty"); final FileOutputStream f=new FileOutputStream("/dev/tty.usbserial-A9007Ndt"); System.out.println("tty opened");
The second println is never reached, but there are no exceptions either.
Anyone know what gives?