Futaba SBUS reverse engineered to work with Arduino

Hi all,

I am trying to implement a sensor to a drone to avoid obstacles. I want to control the pitch channel so that when the drone senses an obstacle in front, the Arduino will overwrite the pitch channel, the drone will pitch up, and move back to avoid the obstacle.

I am using a 8 channel Futaba R2008SB radio receiver. I downloaded the Arduino libraries:

FUTABA_SBUS library: GitHub - mikeshub/FUTABA_SBUS: SBUS driver for arduino
Streaming library: Streaming | Arduiniana

I used a 74LS14 hex inverter.
I connected the SBUS signal of the radio receiver to input of an inverter, the output of the inverter to the RX of the Arduino.
The TX of the Arduino connected to the input of another inverter, the output of the inverter to the RC signal of the Pixhawk.

I opened the serial monitor and set it to 115200 baud, however, there is no numbers displayed on the serial monitor.

I am wondering if the code is suitable for 8 channels, or am I required to modify the code to suit 8 channels? Does the code work if some of the channels between the radio transmitter and the radio receiver are inverted? Also, I am not sure whether my circuit connections are correct.

I do not understand SBUS protocol. I am interested to learn about how the bytes affect the channels.

I hope to receive help please, I would appreciate your help. Thanks.

Below is the code:

#include <FUTABA_SBUS.h>
#include <Streaming.h>


FUTABA_SBUS sBus;


void setup(){
  sBus.begin();
  Serial.begin(115200);
}

void loop(){
  sBus.FeedLine();
  if (sBus.toChannels == 1){
    sBus.UpdateServos();
    sBus.UpdateChannels();
    sBus.toChannels = 0;
    Serial<<sBus.channels[0]<<","<<sBus.channels[1]<<","<<sBus.channels[2]<<"\r\n";
  }
}