You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was a change of default pins for serial 1 and serial 2, made by Espressif in the ESP32 Arduino core, documentend in pull request #8800.
This causes default definition to not work on boards which where designed before this pull request. I use the Minitel ESP dongle from Iodeo, which on the same minitel, with the same program, don't work anymore.
I've tried to call Serial2.begin(1200, SERIAL_8N1, 16, 17); after the instance constructor, and it works ok. But there are two class methods which don't work : changeSpeed(int bauds) and searchSpeed(). Both these methods use a call to myserial.begin(bauds), and this method hardcodes the pins to be use.
I believe a workaround would be to add two private members to store the TX and RX pins, and call the long begin method in the class methods, like : mySerial.begin(bauds, SERIAL_8N1, rx_pin, tx_pin);
instead of : mySerial.begin(bauds);
These two private members can be default initialized by the actual default constructor, or could be passed to a second constructor :
There was a change of default pins for serial 1 and serial 2, made by Espressif in the ESP32 Arduino core, documentend in pull request #8800.
This causes default definition to not work on boards which where designed before this pull request. I use the Minitel ESP dongle from Iodeo, which on the same minitel, with the same program, don't work anymore.
I've tried to call
Serial2.begin(1200, SERIAL_8N1, 16, 17);
after the instance constructor, and it works ok. But there are two class methods which don't work :changeSpeed(int bauds)
andsearchSpeed()
. Both these methods use a call tomyserial.begin(bauds)
, and this method hardcodes the pins to be use.I believe a workaround would be to add two private members to store the TX and RX pins, and call the long begin method in the class methods, like :
mySerial.begin(bauds, SERIAL_8N1, rx_pin, tx_pin);
instead of :
mySerial.begin(bauds);
These two private members can be default initialized by the actual default constructor, or could be passed to a second constructor :
Another way would be to have the pins default initialized in the constructor :
I've modified the class to work for me, I can make a pull request if needed.
Thank you.
The text was updated successfully, but these errors were encountered: