From 5dfbf7aae92ecf7ac4712ba06799962bea427cc0 Mon Sep 17 00:00:00 2001 From: sirrow Date: Sun, 6 Sep 2020 16:22:29 +0900 Subject: [PATCH] init --- connect_switch.ino | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 connect_switch.ino 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++; +}