Arduino + 以太网扩展板 + 蓝牙 HC-05

Arduino + Ethernet shield + Bluetooth HC-05

我想通过蓝牙将Arduino Uno连接到其他设备。它一直有效,直到我添加了以太网屏蔽。

此行中断蓝牙模式:EthernetServer server(80);

void setup() {
  pinMode(9, OUTPUT); 
  Serial.begin(9600); 
  BTSerial.begin(38400); // HC-05 default speed in AT command more
  Ethernet.begin(mac, ip);
  server.begin();
}

使用以太网屏蔽时不能使用针脚 4、10、11、12 和 13。因此,如果您将其中之一用于 SoftwareSerial,这就是原因。