I trying to add a sensor(MLX90614-Infrared Thermometer) using I2C port.
but pixhawk board very difficulty.
I’ve got some information for add new sensor,
first, create driver code(sensor.h/sensor.cpp) in PX4Firmware.
second, create library code in Ardupilot
finaly, use the library in arducopter code
It’s that right??
Please give me some information, how to implement new sensor in pixhawk or code.
thank
You need to develop a MLX90614 driver for the PX4. This is not an easy task for a beginner, but if you have a strong programming background it can be done without too much difficulty. Look at the batt_smbus driver as a good example of a well done I2C driver.
General steps:
-Develop driver
-Test in nsh
-publish data with uORB
-Subscribe to data where appropriate (i.e. usercode.cpp if simple)
-Do something with data like log it or create a new MAVLINK message
-If new MAVLINK then you can view the data using a GCS via the telemetry feed
If you need help, consider finding a programmer with PX4 experience - message me for suggestions.
Hi B-rad I,m trying to develop a driver for the HTU21D (Humidity/Temperature Sensor) using I2C. I can do that it works in the file ArduCopter.cpp following the next instructions:
The main problem is that delay is too much and the px4 will reboot. However, i obtain the temperature of the device. Can you give any suggestion for implement the driver within the PX4firmware? In order to add an interruption for this I2C .