commit 5dfbf7aae92ecf7ac4712ba06799962bea427cc0 Author: sirrow Date: Sun Sep 6 16:22:29 2020 +0900 init diff --git a/connect_switch.ino b/connect_switch.ino new file mode 100644 index 0000000..56fd6f6 --- /dev/null +++ b/connect_switch.ino @@ -0,0 +1,29 @@ +#include + +void setup() +{ + SwitchControlLibrary(); +} + +int loopCount = 0; +void loop() +{ + if (100 < loopCount) + loopCount = 0; + + if (loopCount == 50) + { + SwitchControlLibrary().PressButtonL(); + SwitchControlLibrary().PressButtonR(); + SwitchControlLibrary().ReleaseButtonL(); + SwitchControlLibrary().ReleaseButtonR(); + } + + if (loopCount == 100) + { + SwitchControlLibrary().PressButtonA(); + SwitchControlLibrary().ReleaseButtonA(); + } + + loopCount++; +}