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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.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 1.05软件系列库_Bluetooth_Arduino - Fatal编程技术网

Bluetooth Arduino 1.05软件系列库

Bluetooth Arduino 1.05软件系列库,bluetooth,arduino,Bluetooth,Arduino,我是Arduino的新手,在尝试BluetoothShieldDemo时遇到了两个问题 我只能将数据从蓝牙模块(通过串行监视器)发送到手机,但无法将数据从手机发送到蓝牙模块(在串行监视器中显示)。我用示波器检查Arduino板RX引脚中是否有信号,但串行监视器中没有数据显示。我怀疑这是IO问题,所以我将IO从数字引脚6和7更改为数字引脚2和3,然后是数字引脚4和5。但它仍然不起作用。然后我将代码更改为使用硬件串行(Serial1),它现在可以工作了。我只是想知道为什么它不能与SoftwareSe

我是Arduino的新手,在尝试BluetoothShieldDemo时遇到了两个问题

  • 我只能将数据从蓝牙模块(通过串行监视器)发送到手机,但无法将数据从手机发送到蓝牙模块(在串行监视器中显示)。我用示波器检查Arduino板RX引脚中是否有信号,但串行监视器中没有数据显示。我怀疑这是IO问题,所以我将IO从数字引脚6和7更改为数字引脚2和3,然后是数字引脚4和5。但它仍然不起作用。然后我将代码更改为使用硬件串行(Serial1),它现在可以工作了。我只是想知道为什么它不能与SoftwareSerial一起工作

  • 虽然我可以发送和接收数据,但我无法更改蓝牙名称。发送以下命令时,蓝牙模块没有响应。蓝牙模块是否处于某种锁定模式?或者命令与制造商不同?我得到的蓝牙模块上只有一个CSR 31A2芯片。但我在网上看到的另一个防护罩有两个芯片,它是CSR BC417

  • 代码:

    blueToothSerial.print("\r\n+STWMOD=0\r\n"); 
    blueToothSerial.print("\r\n+STNA=BluetoothSlave\r\n"); 
    blueToothSerial.print("\r\n+STOAUT=1\r\n"); 
    blueToothSerial.print("\r\n+STAUTO=0\r\n"); 
    delay(2000); 
    blueToothSerial.print("\r\n+INQ=1\r\n"); 
    

    提前谢谢

    1-使用SoftwareSerial时,您如何声明引脚(输入/输出)?您是否正确读取串行数据(在数据传输之间留出足够的时间,但在正确的时间读取)


    2-找到模块的数据表,看看它支持哪些命令。

    需要澄清的问题应作为注释添加。