GPIO_ULTRASOUND_xxx not defined. Driver not supported

I’m trying to add in the SRF05 Ultrasonic driver but, I’m getting the following error “GPIO_ULTRASOUND_xxx not defined. Driver not supported.” Where/How do I set the defines for GPIO_ULTRASOUND_TRIGGER and GPIO_ULTRASOUND_ECHO? There is no information on how to use this driver.

suggestion:
USE a cheap microcontroller with uart support(eg. - arduino ).
once you get distance reading : send it over serial to your flight controller

this is beacause you can fake uart communication to fit in existing drivers. :slight_smile:
Eg - read page no. 6 of:
https://www.sgbotic.com/products/datasheets/sensors/DE-LiDAR%20TFmini%20Datasheet-V1.7-EN.pdf

I’ll give it a look. Thanks…

How does the FC read the output, if an esp32 is used?

I updated board_config.h with:

#define GPIO_ULTRASOUND_TRIGGER  /* PTD0 */  (GPIO_SWDIO | GPIO_OUTPUT_SET | GPIO_PORTE | GPIO_PIN14)
#define GPIO_ULTRASOUND_ECHO     /* PTA10 */ (GPIO_PULLUP | GPIO_INPUT | GPIO_PORTD | GPIO_PIN15)

At least now firmware builds. I’m not sure if this is correct or not.

Still not working… Not sure how to actually enable the GPIO pins

Is it possible to access the GPIO pins on PixHawk 6C using PX4? If so, how is it possible?

While I’ve been waiting for a reply, I began experimenting with ArduPilot and within 15 minutes I was able to connect the sonar sensor via GPIO. So, I no longer need to sort out I2C. Looks like ArduPilot is the answer I needed