How to develop drivers for a custom sensor?

Hello, I’m new to Ardupilot and drone development. I’ve created a custom circuit/sensor using an ESP32 devkit and IR sensors. My goal is to connect the ESP32 to a Cube Orange+ via I2C. While I’m comfortable with Arduino and utilizing libraries like Wire.h to connect basic microcontrollers, I’m facing challenges in receiving data on the Cube side of the board. For example, Im not sure how to add code to the Ardupilot repo I’ve cloned. I’d greatly appreciate any advice on learning to write a driver for this or if there are existing resources available. Thank you.

use lua scipts on the AP side.

1 Like

Thank you for your response! I did look into Lua scripting as an option, but I’m still looking to learn how to edit the C/C++ code and adding changes to it directly, or writing drivers in C/C++. Do you have any recommendations on how I can go about this?