我正在使用processing lib,我想用它创建一个虚拟串口,用oter read,我有很多读取串口的例子,但我不知道如何打开串口,如何做到这一点。
发布于 2012-09-12 03:18:26
从您引用的链接,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);https://stackoverflow.com/questions/12376399
复制相似问题