Adding a potentiometer to a pixhawk borad via I2C interface

Hello to everyone, Currently our group intend to add a AS5600 potentiometer to a pixhawk board via the I2C interface. We are using the APM Copter 3.6 firmware and wondering how to read and use the data from the new sensor?

I’ve got some information about adding new sensors, saying that I have to add some code,like creating driver code,to the PX4Firmware. Is that necessary? Can’t I just use the i2c port to simply get data like I do in arduino uno board?

Please give us some information about how to get sensor data.Thanks!:grinning:

This is Ardupilot not PX4.

first thing to do is setup the dev environment, then there are some instructions for setting up i2c drivers here:

not as easy as arduino but probably not a huge amount harder.

I would also be interested in setting up a AS5600 driver for rover sailboats.

Thanks a lot for your reply,which is helpful!