Open dl5dla opened 3 years ago
Thanks for the bug report and the idea, it can be extended to the ESP8266 I think...
I will take a peek on it on the weekend.
Thanks
I made some quick and dirty changes to support UART2 of the ESP32. Code needs to be cleaned up.
line 286:
#include <SoftwareSerial.h>
line 335:
class FT817 { public: FT817(); // setup
void begin(int baud,int handshake,int rx,int tx);
#else
void setSerial(SoftwareSerial portInfo); // load the softserial into the FT817
void begin(int baud); // set the baudrate of the softserial lib
#endif
// toggles
line 29:
HardwareSerial rigCat(2);
#include <SoftwareSerial.h>
extern SoftwareSerial rigCat(12, 11); // rx,tx
FT817::FT817(){ } // nothing to do when first instanced
/** SETUP ****/
// Setup software serial with user defined input // from the Arduino sketch (function, though very slow) void FT817::setSerial(SoftwareSerial portInfo) { rigCat = portInfo; // just commented out for ESP - no idea how to adapt for ESP }
// similar to Serial.begin(baud); command
void FT817::begin(int baud,int handshake,int rx,int tx) { rigCat.begin(baud,handshake,rx,tx); }
void FT817::begin(int baud) { rigCat.begin(baud); }
line 14:
#include <SoftwareSerial.h>
line 29:
void setup() { Serial.begin(9600,SERIAL_8N1,12,13);
radio.begin(9600,SERIAL_8N1,22,23);
#else
radio.begin(9600);
#endif
Serial.println("Starting...");
}
Sorry for the long delay...
I will be playing with this this weekend and will try to simulate here an fixing.
Hi Pavel, the code does not successfully compile for ESP32 board. Error message is
src/main.cpp:14:28: fatal error: SoftwareSerial.h: No such file or directory
It looks like that SoftwareSerial is not supported out of the box for ESP32 boards. May be there are some special libraries for SoftwareSerial on ESP32, but nevertheless it might be more efficient to use one of the three available UARTs (UART0, UART1 and UART2) of the ESP32. I am wondering how to adapt the code accordingly but I am not sure (and may be not skilled enough) to start.