Single Button Not working but Serial monitor detects it (Proffie V3.9)

Got a button hooked up to ‘button1’ on the proffie board. Serial monitor shows a press when i hit the button but saber isn’t responding to it.

EVENT: Aux-Pressed#1 millis=14356

EVENT: Aux-Pressed millis=14356

EVENT: Aux-Released#1 millis=14514

EVENT: Aux-Released millis=14514

EVENT: Aux-Shortclick#1 millis=14514

EVENT: Aux-Shortclick millis=14514

EVENT: Aux-SavedShortclick#1 millis=14657

EVENT: Aux-SavedShortclick millis=14657

EVENT: Clash millis=18688

I have buttons in my config file

#ifdef CONFIG_BUTTONS

Button AuxButton(BUTTON_AUX, powerButtonPin, “pow”);

Button PowerButton(BUTTON_POWER, auxPin, “aux”);

#endif

one thing i am confused about is that if i #define CONFIG_BUTTONS in my CONFIG_TOP. I get a compile error of ‘BUtton’ does not name a type. So i figured maybe its include somewhere in the saber_fett263_buttons.h file. But that is gated around CONFIG_PROP. So then i added #define CONFIG_PROP to my CONFIG_TOP and then i get whole bunch of other compile errors. So i went back to Fett263 Proffieboard ProffieOS6 & 7 Config Helper and created a blank config file just to check, and i notice that those config files also don’t define CONFIG_PROP or CONFIG_BUTTONS in the CONFIG_TOP… so now i am very confused what i should be doing here.

KESTIS_ECO_Max.h (60.4 KB)

Attached config if anyone sees something obviously wrong…

You probably want to change NUM_BUTTONS to 2.

You do not need to define CONFIG_BUTTONS or CONFIG_TOP, ProffieOS takes care of that for you.
Basically, each section of the config file is included in a different place in ProffieOS.ino. It’s like having five different config files, but all in one file.

NUM_BUTTONS 2 now allows me to swap presets when its pressed. I expected it to ignite when i press it but i suppose ill have to read the prop commands more closely to see what combonations of presses do what. But at least its acknowlding the presses now which is nice. Thanks for finding this, I assumed i set NUM_BUTTONS to 1 since… i only have one button connected.

If you only have 1 button connected then your CONFIG_BUTTON section should be:

#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow");
#endif

If you only have one button it should be wired to powerButtonPin and named BUTTON_POWER or it will not work with a 1 button prop using NUM_BUTTONS 1.

If, for some reason, the power button is wired to the auxPin you can replace “powerButtonPin” with “auxPin” in CONFIG_BUTTONS, but that’d be only in rare occasions.

The Aux button is expected to be the second button in a 2 button set up, the main button is Pwr in either a 1 or 2 button set up.

i had the pins names swapped bangs head on desk

1 Like