I'm trying to do the task which will use the Java on Pi 3 to do serial talk to an external device.
But I just have no idea.
I know Java has Process object which I can invoke exec(String cmd) so I should run exec("screen", "/dev/ttyUSB0", "9600") from the main method.
The part I have no idea is to flushing some String into that screen session so the device can interpret the String further.
Thanks in advance for any suggestion.