【发布时间】:2019-07-08 20:50:48
【问题描述】:
我需要使用另一个串行将数据从 arduino teensy 发送到处理,因为默认串行 (Serial.begin(9600)) 已用于大型程序
我尝试阅读一些关于如何更改我想接收的序列号 (https://processing.org/reference/libraries/serial/Serial.html) 的参考资料,但我不认为它可以更改
void setup() {
Serial.begin(115200); // already used
Serial2.begin(9600); // processing
}
void loop() {
Serial.println("...") //big code that i am not allow to change
Serial2.println("hello world");
delay(1000);
}
我希望在我的处理中重复得到“hello world”,但我真的不知道如何编写代码,所以我可以从 Serial2 而不是从 Serial 获取价值
【问题讨论】:
-
您使用的是哪个版本的 Teensy?您如何连接到Serial2 引脚?如果
Serial连接到 USB,您是否有第二个 USB 串行转换器来接收来自处理中的Serial2的TX引脚的数据?
标签: arduino serial-port processing teensy