Hi All,
I currently have a bank / mode button state set up using the following code, however when 'setupMode' is in state 1, i am trying to set up another layer to have a bank within a bank.
So when I toggle into the button state from 0 - 1, i would then press another button to switch on another bank state with another 8 button states. Hope that makes sense. Have yet to figure this out and thought by creating a new void function and calling it within the 'setupMode 1' it would work.
Any help of how to get this going would be great.
Thanks
I currently have a bank / mode button state set up using the following code, however when 'setupMode' is in state 1, i am trying to set up another layer to have a bank within a bank.
Code:
void setupToggle() {
setupVal = digitalRead(setupButton);
delay(10);
setupVal2 = digitalRead(setupButton);
if (setupVal == setupVal2) {
if (setupVal != setupState) {
if (setupVal == HIGH) {
if (setupMode == 0) {
Serial.println("Setup On");
setupPixel(setupLED.Color(255, 255, 255), 0);
setupMode = 1;
} else {
if (setupMode == 1) {
Serial.println("Setup Off");
setupPixel(setupLED.Color(0, 0, 0), 0);
setupMode = 0;
}
}
}
setupState = setupVal; // save the new state in our variable
Serial.println(setupVal);
}
}
}
So when I toggle into the button state from 0 - 1, i would then press another button to switch on another bank state with another 8 button states. Hope that makes sense. Have yet to figure this out and thought by creating a new void function and calling it within the 'setupMode 1' it would work.
Any help of how to get this going would be great.
Thanks
Last edited: