小编Jam*_*ess的帖子

ESP32 - 软件串行库

我有一个 ESP32,需要使用更多串行端口,但我无法在 ESP32 中使用软件串行库,因为 Arduino IDE 无法识别该库。

我怎么能用它呢?

   #include <Arduino.h>
   #include <SoftwareSerial.h>

   SoftwareSerial SoftSerial(4, 5);

   void setup() 
   {
     Serial.begin(9600);
     SoftSerial.begin(115200); 
   }

   void loop() 
   {
     while (Serial.available())
     {
       SoftSerial.write("on");
     }
   }
Run Code Online (Sandbox Code Playgroud)

谢谢

arduino esp32

4
推荐指数
1
解决办法
5万
查看次数

标签 统计

arduino ×1

esp32 ×1