首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >处理打开虚拟串行端口

处理打开虚拟串行端口
EN

Stack Overflow用户
提问于 2012-09-12 03:13:48
回答 1查看 1.6K关注 0票数 0

我正在使用processing lib,我想用它创建一个虚拟串口,用oter read,我有很多读取串口的例子,但我不知道如何打开串口,如何做到这一点。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-09-12 03:18:26

从您引用的链接,http://www.processing.org/reference/libraries/serial/Serial.html

代码语言:javascript
复制
// 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);
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12376399

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档