Can Pixhawk take commands over I2C instead of from RC receiver?

Anyone know if it’s possible for the Pixhawk to accept commands over I2C as opposed to via PPM from an RC receiver–or if not, are I2C to PPM converters available somewhere?

Do you have a particular I2C device you’re thinking of? What about a serial port instead?

I do, the idea was to use the Pixhawk for hardware in the loop in a flight simulator, and we have rotary encoders with I2C interfaces reading the position of the controls. Would serial be easier? If I2C is a no-go I could find other sensors, or make some kind of translator…

Adding PX4 support for I2C rotary encoders shouldn’t be that hard, but I don’t think I’m following what this has to do with RC?

I suppose that encoders are used to build something like a joystick, am I right?

I think that you need to implement a driver that uses I2C library to read the encoders inputs and that publishes these inputs (e.g. roll, pitch, yaw and throttle) into INPUT_RC uORB topic, just like it is done in regular RC drivers.

Thanks! We’re using a Pixhawk in an RC model of our experimental aircraft, so the notion was floated of sending commands to the Pixhawk through a flight simulator with pedals, yoke etc to get a more “realistic” pilot interface than the RC transmitter.

1 Like

Hi, i want to send a command from the Pixhawk to a arduino Mega. how can i do that?

@juan_leiro If you are talking about simple trigger commands, you can assign a trigger on to one of the PWM outputs and read from the arduino

Hi @Jaeyoung-Lim, thanks for your answer.

What I want is to send a command from QGC to an arduino connected by serial to the QGC.

Im trying to use the customcommandWidget but I saw in the code that. this send the command to the pixhawk (vehicle->id()) I dont know how to change that. In the customcommandqml file you can choose the destiny component but you can not choose the destiny system, in my case, the arduino and not the Pixhawk.

Can you help me?

Thanks