Hi everyone,
We have a listener to get coordinates from MDEK1001 tags. Also, we have a code that shows these coordinates but when the first opening, we should first open the Tera Term and then run the code. Also, it runs at first run but not at second run but again runs at third run.
Do you have any suggestions?
SerialPort serialPort = (SerialPort) commPort;
serialPort.setSerialPortParams(115200, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE);
InputStream in = serialPort.getInputStream();
OutputStream out = serialPort.getOutputStream();
bw = new BufferedWriter(new OutputStreamWriter(out));
bw.write("\r\r");
bw.write("lec\r");
bw.flush();
(new Thread(new SerialWriter(out))).start();
serialPort.addEventListener(new SerialReader(in));
serialPort.notifyOnDataAvailable(true);