Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Bluetooth Arduino蓝牙串行_Bluetooth_Arduino_Serial Port_Baud Rate - Fatal编程技术网

Bluetooth Arduino蓝牙串行

Bluetooth Arduino蓝牙串行,bluetooth,arduino,serial-port,baud-rate,Bluetooth,Arduino,Serial Port,Baud Rate,我在使用Arduino蓝牙时总是遇到一些奇怪的问题,在我去买另一个之前,我想看看是否有人对此有所了解 尽管将串行监视器和Arduino波特率都设置为9600,但我得到了一个不匹配,所有输出的字符都是乱码。此外,当我尝试从Windows计算机连接时,使用Serial.println(“Words”)会被Serial.read()捕获,Serial.read()最终会从“Words”返回“w”(我知道,因为更改第一个字母会导致与Serial.read()不同的值)。我很困惑,任何帮助都将不胜感激。尝

我在使用Arduino蓝牙时总是遇到一些奇怪的问题,在我去买另一个之前,我想看看是否有人对此有所了解


尽管将串行监视器和Arduino波特率都设置为9600,但我得到了一个不匹配,所有输出的字符都是乱码。此外,当我尝试从Windows计算机连接时,使用Serial.println(“Words”)会被Serial.read()捕获,Serial.read()最终会从“Words”返回“w”(我知道,因为更改第一个字母会导致与Serial.read()不同的值)。我很困惑,任何帮助都将不胜感激。

尝试改用readString(),看看是否有帮助。

尝试改用readString(),看看是否有帮助。

您是如何连接蓝牙模块的?
有时USB和蓝牙模块会争夺rx/tx的控制权。

如果您使用Arduino mega,您可以使用Serial1的tx/rx引脚,或者只使用SoftwareSerial library。

您是如何连接蓝牙模块的?
有时USB和蓝牙模块会争夺rx/tx的控制权。
如果您使用Arduino mega,您可以使用Serial1的tx/rx引脚,或者只使用SoftwareSerial库