Arduino control wire for the rc in port

Hi
I’m doing a project where I’m trying to control the ePX4 mini from a Arduino using a wire into the RC in port on my px4 mini. I am using ArduPilot i know that the protocol is using sBus. what I’m struggling to find is the name and variables I need to change to change the pith yaw roll and throttle. i cant find a roadmap or protocol on the internet about this got as far as Opentx and AETR and I know that the msg should be in some sort of form [Ch1 , value between xx and yy] but I don’t know the exact protocol/variables this has to be for the ArduPilot to understand it.

Hello,

ive just done the opposite, getting the values out of a pixhawk and into an micro.

This was a helpful reference. The code no longer works, but it explains the protocol to a degree.

should this be found ain a few years and the links dead, heres the summery:

The SBUS protocol uses an inverted serial logic with a baud rate of 100000, 8 data bits, even parity, and 2 stop bits. The SBUS packet is 25 bytes long consisting of:

  • Byte[0]: SBUS header, 0x0F
  • Byte[1 -22]: 16 servo channels, 11 bits each
  • Byte[23]
    • Bit 7: channel 17 (0x80)
    • Bit 6: channel 18 (0x40)
    • Bit 5: frame lost (0x20)
    • Bit 4: failsafe activated (0x10)
  • Byte[24]: SBUS footer

Note that lost frame is indicated when a frame is lost between the transmitter and receiver. Failsafe activation typically requires that several frames are lost in a row and indicates that the receiver has moved into failsafe mode. Packets are sent approximately every 10 ms or 20 ms.