简体   繁体   中英

Processing open a virtual serial port

我正在使用lib 处理 ,我想用它创建一个虚拟的串行端口,并且在读取其他内容后,有很多读取串行端口的示例,但是我找不到如何打开串行端口的方法。

From the link you cited, http://www.processing.org/reference/libraries/serial/Serial.html :

// Example by Tom Igoe

import processing.serial.*;

// The serial port:
Serial myPort;       

// List all the available serial ports:
println(Serial.list());

// Open the port you are using at the rate you want:
myPort = new Serial(this, Serial.list()[0], 9600);

// Send a capital A out the serial port:
myPort.write(65);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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