Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jan 12th, 2018 45 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. $
  2. G
  3. P
  4. G
  5. G
  6. A
  7. ,
  8. .
  9. .
  10. .
  11.    (Carriage return)
  12.    (New Line)
  13. $
  14. G
  15. P
  16. G
  17. S
  18. A
  19.    
  20. static class SerialPortReader implements SerialPortEventListener {
  21.  
  22. public void serialEvent(SerialPortEvent event) {
  23.  
  24.  
  25.             try {
  26.                 byte[] tester = serialPort.readBytes(1);
  27.  
  28.             //System.out.print(getdata);
  29.             InputStream gpsStream = new ByteArrayInputStream(tester);
  30.  
  31.             BufferedReader in = new BufferedReader(new InputStreamReader(gpsStream, StandardCharsets.UTF_8));
  32.             String output = in.readLine();
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.             }
  40.  
  41.  
  42.             catch (SerialPortException | IOException ex) {                  
  43.             }    
  44. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top