我试图使用这个arduino模型的多个串口 .
我打算使用1个ESP8266模块和1个Hm-10 BLE模块 .
我想通过ESP连接webserver . 但我必须将我的ssid和wifi密码发送给esp .
对于这种情况,我计划编写一个android应用程序,它发送ssid并传递给我们的arduino和esp模块 .
可能吗?
最好的祝福 .
我对此做了一些研究,目前我只找到了两个答案:
Native Arduino's Serial Ports + 1: 使用库SoftwareSerial(https://www.arduino.cc/en/Reference/SoftwareSerial)添加"second"串口进行监听 . 所以你可以使用常见的Arduino 's serial ports and other custom defined digital pins (2 pins) to simulate a native Arduino'串口 . 可以在此处找到使用BT和ESP8266的示例:http://www.instructables.com/id/Arduino-Dual-Controlled-RC-Car-Bluetooth-and-WiFi/step2/The-Connection/
As many devices as suported by your hardware configuration/specifications: 使用相同的串行端口控制具有相同波特率的多个设备,然后您必须一次选择要收听的设备 . 使用某些代码,您可以等待设置变量(使用BLE),并在完成更改后再听另一个(ESP8266) .
有一个结合这两个答案的例子可以帮助您在我之前提供的关于SoftwareSerial库的链接中查找示例“双端口接收” .
1 回答
我对此做了一些研究,目前我只找到了两个答案:
Native Arduino's Serial Ports + 1: 使用库SoftwareSerial(https://www.arduino.cc/en/Reference/SoftwareSerial)添加"second"串口进行监听 . 所以你可以使用常见的Arduino 's serial ports and other custom defined digital pins (2 pins) to simulate a native Arduino'串口 . 可以在此处找到使用BT和ESP8266的示例:http://www.instructables.com/id/Arduino-Dual-Controlled-RC-Car-Bluetooth-and-WiFi/step2/The-Connection/
As many devices as suported by your hardware configuration/specifications: 使用相同的串行端口控制具有相同波特率的多个设备,然后您必须一次选择要收听的设备 . 使用某些代码,您可以等待设置变量(使用BLE),并在完成更改后再听另一个(ESP8266) .
有一个结合这两个答案的例子可以帮助您在我之前提供的关于SoftwareSerial库的链接中查找示例“双端口接收” .