arduino nano、uno 和 leonardo 可以使用多少软件序列号?

How many Software Serial can use with arduino nano, uno and leonardo?

我正尝试在这个 arduino 模型上使用多个串口。

我打算使用 1 个 ESP8266 模块和 1 个 Hm-10 BLE 模块。

我想通过 ESP 连接网络服务器。但我必须将我的 ssid 和 wifi 密码发送到 esp。

对于这种情况,我计划编写一个 android 应用程序来发送 ssid 并传递给我们的 arduino 和 esp 模块。

可能吗?

此致。

我对此做了一些研究,目前只找到了两个答案:

  1. 原生 Arduino 串口 + 1: 使用库 SoftwareSerial (https://www.arduino.cc/en/Reference/SoftwareSerial) to add a "second" serial to listen. So you can use common Arduino's serial ports and other custom defined digital pins (2 pins) to simulate a native Arduino's serial port. An example using BT with ESP8266 can be found here: http://www.instructables.com/id/Arduino-Dual-Controlled-RC-Car-Bluetooth-and-WiFi/step2/The-Connection/
  2. 硬件支持的设备数量configuration/specifications:使用同一个串口控制多台波特率相同的设备,必须选择一个你想一次听。使用一些代码,您可以等待设置变量(使用 BLE),完成后更改为只听另一个(ESP8266)。

有一个结合了这两个答案的示例,可以帮助您在我之前提供的关于 SoftwareSerial 库的 link 中查找示例 "Two Port Receive"。