Logging events from AUX input

I’m trying to log events from an aux input.
I set the BRD_PWM_COUNT to 4 and connected the input signal to pin 55 on my Pixhawk.
The input signal is trigger high, i.e normally 0 and rises to 1 (3.3 V) for about 2 miliseconds when event occurs.
How can I log those events?


Configure the pin as a button input.

Ok. can you explain how?


@geofrancis can you please help me, I’m probably doing something wrong cause I cant see the BTN events on my logs…
Is this the correct setting:
BTN_PIN1 = 54 (AUX5)
RC13_DZ = 0
RC13_max = 1700
RC13_min = 1500
RC13_reversed = 0
RC13_TRIM = 1000

What am I doing wrong?

have you tried shorting the aux pin to ground with a wire to check it registers the button, its possible 2ms its too short a pulse to be registered as a button.

yes I tried but still can’t see it on the log
It supposed to be BTN on the log? it saves the time and position when the event occurs?
BTN_FUNCT1 and BTN_OPTIONS1 is still set to 0, is it right?

Now that you mention it, I don’t think I have ever tested with it set to 0, try setting it to 28 for relay 1.

I tried setting BTN_FUNCT1=28 still can’t see it on the log :frowning:
I’m quite a newbie on this, how should I run this script?

is BRD_PWM_COUNT set to 4?

BRD_PWM_COUNT is set to 2

1 Like

what is BTN_OPTIONS1 set to?

BTN_OPTIONS1 is set to 0

what is servo 13 function set to?

it is set to 0
should I change it to -1 (GPIO)?

try it but im not sure if that works in 4.1, i think that might be a 4.2 dev option only

I just noticed, what pin are you testing? aux 5 or aux 6?

aux5 (BTN_PIN1 = 54)

I was just looking I don’t think using the button in will work, I just looked at the code and the button needs to be held down for at least 50ms.
What your looking for is something like the camera feedback pin, its used for getting ms level pin logging but I don’t think that is available on copter

I tried servo 13


SERVO13_MIN = 1700

SERVO13_MAX = 1900

SERVO13_TRIM = 1000

still cant see the BTN on the log :pensive: