简体   繁体   English

Java 8中通过串行端口发送和接收数据的多平台方式?

[英]Multiplatform way to send and receive data through serial port in Java 8?

I want to send and receive data from my Arduino in my Java application. 我想在Java应用程序中从Arduino发送和接收数据。 Another feature I need is list of open serial ports. 我需要的另一个功能是打开的串行端口列表。 I just want to ask if there is some elegant way to do it in Java 8. I want to send receive primitive data types and Strings. 我只想问一问在Java 8中是否有一些优雅的方法。我想发送接收原始数据类型和字符串。 I need to make this work on MacOS, Linux and Windows. 我需要在MacOS,Linux和Windows上进行这项工作。 How could I possibly achive it ? 我怎么可能实现呢? Thanks for your help. 谢谢你的帮助。

I use JSSC for Java projects for serial comunications with Arduino. 我将JSSC用于Java项目,以便与Arduino进行串行通信。

Its works very well and run in Windows and macOS (linux I not tried yet) 它运行良好,可以在Windows和macOS中运行(我尚未尝试过的Linux)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM