I want to program my proffie for future builds to run a dual blade build with independent blade control, but do so with 4 switches so that each blade can have a main and an aux switch. I’ve written a config file that should work as it’s given me no error messages, but it doesn’t seem to be working. Any help would be greatly appreciated.
Config below
#define NUM_BUTTONS 4
#ifdef CONFIG_BUTTONS
Button PowerButton(BUTTON_POWER, powerButtonPin, "pow1");
Button AuxButton(BUTTON_AUX, auxPin, "aux1");
Button Power2Button(BUTTON_POWER, blade5Pin, "pow2");
Button Aux2Button(BUTTON_AUX2, aux2Pin, "aux2");
#endif
That is not going to work as you think.
For starter, there is no prop file that recognizes more than 3 buttons, so you will need to write a prop file that uses 4 buttons.
Second, the event BUTTON_POWER will not give you independent control.
You would be better off using NUM_BUTTONS 2, wire both power in parallel and both aux in parallel as well. Then you can use this prop file: saber_BC_buttons.h as your prop file.
It will not give you independent control but you will be able to control your saber from 2 different set of buttons.