I need to install a humidity sensor on my rover so that it can return home in case of rain. I have a Raspberry Pi 4 with a Navio2 board.
The software is ArduRover 4.0, and I am using Mission Planner on a PC.
I connected the control board to pin 14 on the servo rail and through SSH, I set the pin as GPIO 513. I have tested it and the Raspberry correctly reads the sensor state (cat /sys/class/gpio/gpio513/value
).
However, what I cannot figure out is how to set ArduPilot to use the read value to initiate the return to home.
Using Mission Planner, I changed BTN_ENABLE from 0 to 1, set BRD_PWM_COUNT from 8 to 12, and changed BTN_PIN1 from -1 to 55. The problem is that the options BTN_OPTIONS1 and BTN_FUNC1 do not appear in the full parameter list on mission planner.
I tried restarting several times and refreshing the parameters. I also tried the values 54 and 513 for BTN_PIN1. I even tried setting SERVO14_FUNCTION and SERVO13_FUNCTION to GPIO (-1).
How do I set up button1 so that if the sensor measures rain (LOW value), the rover will initiate return to home?
Hi Carlo,
Welcome to the forum!
I can hardly be of help with this ArduPilot setup. Maybe someone on the ArduPilot forum can suggest some steps.
A post was split to a new topic: Help