Fazecast / jSerialComm

Platform-independent serial port access for Java
GNU Lesser General Public License v3.0
1.34k stars 287 forks source link

Complete event based example request #304

Closed grunzasr closed 3 years ago

grunzasr commented 4 years ago

A complete example of an event based reading and writing application would be really helpful. The code snippets in the Usage area are useful but without a complete example, I have missed something. I am not getting events (the code did not hit a break point in the event handler code) but there is data to be read ( the bytesAvailable() method returns greater than zero).

I am a beginning Java programmer (30+ years of C and assembly) so it is probably a simple mistake but I cannot find it. A complete example would allow me to verify my code has all the pieces it is supposed to have.

youcanwin2088 commented 3 years ago

/*

package com.fazecast.jSerialComm;

import java.io.InputStream; import java.util.Scanner;

/**

hedgecrw commented 3 years ago

Please see the comment in this thread for a complete example. This code is located in the source directory under src/test/java/com/fazecast/jSerialComm.