How to make arduino to communicate with pixhawk by i2c?

I attached simple digital sensor(0 or 1 value out) on arduino

and make arduino output the value of sensor by i2c, if requested.

Now, what I want to know is how to connect arduino to pixhawk by i2c.

I want to make pixhawk read the digital sensor value of arduino’s output.

(just read the value. not write at this time)

Please help me.

Thank you in advance.

hi Insight,
i have same issue. did you solve it?
i tried with
#include <src/modules/px4iofirmware/protocol.h>
but compile error is “fatal error: src/modules/px4iofirmware/protocol.h: No such file or directory”
I was trying to make little modification into px4_simple_app just to test, but i wasn’t able to add a single library…same compile error.
What is the library i have to use?
thank you