diff --git a/connect_switch.ino b/connect_switch.ino index 1ba3a54..9d8e210 100644 --- a/connect_switch.ino +++ b/connect_switch.ino @@ -16,8 +16,17 @@ struct arrow { int state; }; +struct button { + int pinNumber; + bool prev; + bool current; +}; + struct arrow arrowTable[4]; +#define ButtonTableLength 1 +struct button buttonTable[ButtonTableLength]; + void perms() { if(val == 0){ if (table[index] == 1){ @@ -47,9 +56,17 @@ void setup() table[0] = 1; table[tableSize/2] = 2; SwitchControlLibrary(); + MsTimer2::set(1, perms); MsTimer2::start(); + buttonTable[0].pinNumber = 3; + for (int i; i