Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By costo
#40530 You are a genius :D
martinayotte wrote:BTW, I'm seeing that the ArduinoESP core has integrate Serial.swap(), so you can try it out instead of using the plain SDK alternate function.
It should be something like :
Code: Select allSerial.swap(15); //toggle between use of GPIO13/GPIO15 or GPIO3/GPIO(1/2) as RX and TX


This did the trick.
Code: Select allserial.swap();

Very likely the SDK function would have done the trick too if I had tried harder.
I had two instances of Serial.begin in the sketch and at both places I had to put the function into it.
I like this short code much more than the SDK function
so thanks again for your investigation into this.
User avatar
By kemalfe
#65793
costo wrote:You are a genius :D
martinayotte wrote:BTW, I'm seeing that the ArduinoESP core has integrate Serial.swap(), so you can try it out instead of using the plain SDK alternate function.
It should be something like :
Code: Select allSerial.swap(15); //toggle between use of GPIO13/GPIO15 or GPIO3/GPIO(1/2) as RX and TX


This did the trick.
Code: Select allserial.swap();

Very likely the SDK function would have done the trick too if I had tried harder.
I had two instances of Serial.begin in the sketch and at both places I had to put the function into it.
I like this short code much more than the SDK function
so thanks again for your investigation into this.


Hi, can you share working code with swap function?
User avatar
By kemalfe
#65794
costo wrote:You are a genius :D
martinayotte wrote:BTW, I'm seeing that the ArduinoESP core has integrate Serial.swap(), so you can try it out instead of using the plain SDK alternate function.
It should be something like :
Code: Select allSerial.swap(15); //toggle between use of GPIO13/GPIO15 or GPIO3/GPIO(1/2) as RX and TX


This did the trick.
Code: Select allserial.swap();

Very likely the SDK function would have done the trick too if I had tried harder.
I had two instances of Serial.begin in the sketch and at both places I had to put the function into it.
I like this short code much more than the SDK function
so thanks again for your investigation into this.

Hi, can you share working code with swap function?