Hi all,
Apologies if I'm missing something massive here, but having tried a few iterations of this (getting no exceptions from Create but having nothing happen when I run the code) I wondered if I'm going about this all wrong/how best to go about it?
I'm trying to use the Multibutton library for double clicks and long clicks on a set of 7 buttons. They all work as intended when initialised like in the code example, however since the rest of my code gets more complex and I don't really want to have it written 7 times, I am looking for some way to use the PinButton function and its associated .isClick(s etc) in a loop.
The simplest way I imagine this working is to have an array of the buttons, so I can do
PinButton buttons(arrayofpins);
for (count = 0; count <= 7; count++){
if buttons[count].isClick{
*dosomething
}
}
Obviously this doesn't work, but even with more complex iterations (using PinButton separately on each array element, using PinButton on separate variables then assigning them to an array etc etc) I still can't get this to work as I'd hope. Any chance of some pointers please?
Apologies if I'm way off here - it's been half a lifetime since I last worked in C++!