Sending magnetometer data from Arduino to Pixhawk 2 through I2C

Hello!
I am doing a project where I am fusing readings from multiple magnetometers (MLX90393) into one reading using an Arduino Uno as the microcontroller. I want to send the data from the Arduino to my Pixhawk 2.1 flight controller through i2c. I am hoping that it is possible for the Arduino to act as an external magnetometer.

I have tried using the Wire library, but cannot find the address of the I2C port on the Pixhawk or if this is the right way to go.

Wire.beginTransmission(address);
Wire.write(mag_data);
Wire.endTransmission(address);

any tips would be helpful!

1 Like

Hi,
I am trying to do the same thing, I would also appreciate the help!