Read data from Arduino with Pixhawk

I have sensors that are connected to an Arduino. And I plan to connect the Arduino to the Pixhawk via I2C or UART (TELEM2). I want to send this data to my laptop/ground station. The software I’m using is QGC.

How do I properly send the data from the Arduino to Pixhawk, then from Pixhawk to my laptop/QGC?

I2C is a good option, you can look into other drivers using I2C as comparision, e.g. LidarLite and then just transmit the data in the same way. For sending the data to QGC follow this doc:

I’m assuming I will setup the Arduino as Master Writer/Slave Receiver?
Does Pixhawk automatically retrieve data from any device that’s attached I2C?

Yes set up the Arduino as a slave and send the data when the Pixhawk asks for it.

I’m not sure what you mean but you need to run a module on the Pixhawk that asks for data on the correct I2C address, if you have that then yes you will retrieve the data.

So I need to make edits/additions to the PX4 firmware to be able to read from the I2C address. Then flash it to my Pixhawk?

Yes. However if you start from an existing driver the changes can be minimal. Just to match the amounts of bytes you want to receive etc.