Switch On and Off FUTABA_SBUS Lib.

Hi! I have been using the FUTABA-SBUS library for a long time. Many thanks to the author! A Now I needed a port for the TX 9600,8N1 for the Arduino Nano.

So question . Can I use this library to work with the Serial port, turning it off , then turn on at 9600 speed, transmit on Tx, then turn it off and on again at 100000 ? Thus to organize reception of RX SBUSdata and transfer some others data of Serial TX 9600?

I add function in FUTABA_SBUS.cpp

void FUTABA_SBUS::end(){ port.end();}

and in FUTABA_SBUS.h in public:

void end(void);

But the code does not work. There are no errors, but reception does not go!

void loop()
{
  delayMicroseconds(50);
 sBus.begin(BAUD, SERIAL_8E2);
  
  sBus.FeedLine();
  if (sBus.toChannels == 1)
  
{ digitalWrite(13, HIGH);// LED 

    delayMicroseconds(50);
    
    sBus.UpdateChannels();
    sBus.toChannels = 0;
    
    digitalWrite(13, LOW);// LED 

  }
  delayMicroseconds(6000);
  sBus.end();//
  delayMicroseconds(3000);
  sBus.begin();//restart

}

Thank! Gennady

As a result of the experiments, I came to the conclusion that the FUTABA_SBUS library does not work if the Loop () method uses turning off and on the UART port. Therefore, it will also not work when switching the UART speed.