diff --git a/.vscode/arduino.json b/.vscode/arduino.json new file mode 100644 index 0000000..71a88ee --- /dev/null +++ b/.vscode/arduino.json @@ -0,0 +1,7 @@ +{ + "board": "SparkFun:avr:promicro", + "programmer": "AVR ISP", + "port": "COM11", + "sketch": "connect_switch.ino", + "configuration": "cpu=16MHzatmega32U4" +} \ No newline at end of file diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..4430ec7 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "Win32", + "includePath": [ + "C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\SparkFun\\hardware\\avr\\1.1.13\\**", + "C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\**", + "C:\\Users\\sirrow\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.8.2\\**" + ], + "forcedInclude": [], + "intelliSenseMode": "msvc-x64", + "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.24.28314/bin/Hostx64/x64/cl.exe", + "cStandard": "c11", + "cppStandard": "c++17" + } + ], + "version": 4 +} \ No newline at end of file diff --git a/connect_switch.ino b/connect_switch.ino index da3e4e3..6e93d93 100644 --- a/connect_switch.ino +++ b/connect_switch.ino @@ -6,6 +6,7 @@ int loopCount = 0; int state = 0; int rapidFireTable[RapidFireTableSize]; +bool rapidPressState = 0; int index = 0; int val = 1; @@ -40,9 +41,11 @@ void perms() { if(val == 0){ if (rapidFireTable[index] == 1){ SwitchControlLibrary().PressButtonA(); + rapidPressState = true; } if (rapidFireTable[index] == 2){ SwitchControlLibrary().ReleaseButtonA(); + rapidPressState = false; } } index = (index + 1) % RapidFireTableSize; @@ -121,10 +124,13 @@ void loop() val = digitalRead(2); if(prevVal == 1 && val == 0){ SwitchControlLibrary().PressButtonA(); + rapidPressState = true; index = 1; } else if(prevVal == 0 && val == 1){ - SwitchControlLibrary().ReleaseButtonA(); + if(rapidPressState){ + SwitchControlLibrary().ReleaseButtonA(); + } } prevVal = val; diff --git a/panel/20200912.pdf b/panel/20200912.pdf new file mode 100644 index 0000000..3351c5e Binary files /dev/null and b/panel/20200912.pdf differ diff --git a/panel/20200912.svg b/panel/20200912.svg new file mode 100644 index 0000000..37eaf26 --- /dev/null +++ b/panel/20200912.svg @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/panel/20201101.pdf b/panel/20201101.pdf new file mode 100644 index 0000000..0e02fbe Binary files /dev/null and b/panel/20201101.pdf differ diff --git a/panel/20201101.svg b/panel/20201101.svg new file mode 100644 index 0000000..6902134 --- /dev/null +++ b/panel/20201101.svg @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +