【问题标题】:Serial communication from arduino to Linux terminal从 arduino 到 Linux 终端的串行通信
【发布时间】:2022-11-13 01:04:59
【问题描述】:

我一直在尝试将 Arduino 的串行输出打印到 Linux 终端,但发送到终端的输出似乎是空字符串,如下图所示

void setup() {
Serial.begin(9600);

void loop() {
float zby = 4.54;
 Serial.println(zby);
delay(1000);
}

我尝试过使用 Raspberry Pi,所以我将 Arduino 连接到树莓并做了同样的事情,但至少我发现收到了一些东西

【问题讨论】:

    标签: python linux arduino


    【解决方案1】:

    我认为您没有正确设置波特率。在 arduino 上,您将其设置为 9600,但在 pc 上设置为 115200。发送端和接收端的波特率需要相同。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多