From 2589a89fbb3a039bff52d000e0d432305574061d Mon Sep 17 00:00:00 2001 From: sirrow Date: Tue, 8 Sep 2020 23:00:36 +0900 Subject: [PATCH] change table defnition --- connect_switch.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/connect_switch.ino b/connect_switch.ino index 8f92e70..4ed6935 100644 --- a/connect_switch.ino +++ b/connect_switch.ino @@ -1,9 +1,11 @@ #include #include +#define tableSize 40 + int loopCount = 0; int state = 0; -int table[40] = {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; +int table[tableSize]; int index = 0; int val = 1; @@ -35,6 +37,8 @@ void button() { void setup() { + table[0] = 1; + table[tableSize/2] = 2; SwitchControlLibrary(); MsTimer2::set(1, perms); MsTimer2::start();