I am trying to integrate a fuel level sensor onto one of the AUX PWM outputs configured as GPIO. The sensor’s output is described in its (honestly lacking) manual as “analog linear voltage output.” I have AUX5 (servo13) configured as GPIO and the voltage output, which I have confirmed I am getting accurate readings from with a multimeter, plugged in there. I have BATT2 parameters configured as follows (per the wiki):
-BATT2_MONITOR = 24
-BATT2_CAPACITY = 7500 mL (from the aircraft manual)
-BATT2_FL_VLT_MIN = 0.25V (from fuel sensor manual)
-BATT2_FL_V_MULT = 0.222 (1/(4.75-0.25))
-BATT2_FL_FLTR = -1 (disabled for now, will determine later)
-BATT2_FL_PIN = 54 (for AUX5 on cube orange)
-SERVO13_FUNCTION = -1
I believe the pin is where I am hung up. Setting it to 54 gives me no output. Setting it to 14 (Cube Orange) gives me an output, but it is wildly wrong and doesnt change if I pull power from the fuel sensor. Again, I have confirmed the sensor itself is getting power, and giving a correct output on its “voltage out” pin. I have the voltage out pin connected to the signal of AUX5 (servo13) and the ground of that pin connected as well. The sensor is power from an external 12V battery so the ground wire of the sensor is split between that and the servo rail. What am I missing here? There is no info as to what the GPIO pin assignments are for the Cube Orange in its hwdef.dat file. I am not sure what else to do.