I am using the RXTX API to get data from a sensor. https://web.archive.org/web/20200530110106/rxtx.qbang.org/wiki/index.php/Event_Based_Two_Way_Communication
I copy-p