Created
June 21, 2020 02:38
-
-
Save potato4d/5711aa111748c99f8439138c1b818f6e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SwitchControlLibrary.h> | |
| void setup(){ | |
| // put your setup code here, to run once: | |
| SwitchControlLibrary().PressButtonR(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonR(); | |
| delay(500); | |
| SwitchControlLibrary().PressButtonL(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonL(); | |
| delay(500); | |
| SwitchControlLibrary().PressButtonR(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonR(); | |
| delay(500); | |
| SwitchControlLibrary().PressButtonR(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonR(); | |
| delay(500); | |
| SwitchControlLibrary().PressButtonL(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonL(); | |
| delay(500); | |
| SwitchControlLibrary().PressButtonR(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonR(); | |
| delay(2000); | |
| } | |
| void loop() { | |
| // ロトミに話しかける | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| delay(300); | |
| // 選択画面に行く | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| // ID くじをえらぶ | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(300); | |
| // B連打 | |
| for (int i=0;i < 50; i++) { | |
| SwitchControlLibrary().PressButtonB(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonB(); | |
| delay(200); | |
| } | |
| // ときわたり | |
| // 募集開始 | |
| SwitchControlLibrary().PressButtonHome(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonHome(); | |
| delay(1000); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(100); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(1500); | |
| // 設定画面 | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(2000); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(500); | |
| // 時間設定 | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(4); // down | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(500); | |
| // 時間の変更 | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(2); // right | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(0); // up | |
| delay(50); | |
| SwitchControlLibrary().MoveHat(8); // center | |
| delay(200); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(100); | |
| SwitchControlLibrary().PressButtonHome(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonHome(); | |
| delay(1000); | |
| for (int i=0;i<3;i++) { | |
| SwitchControlLibrary().PressButtonA(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonA(); | |
| delay(200); | |
| } | |
| for (int i=0;i<10;i++) { | |
| SwitchControlLibrary().PressButtonB(); | |
| delay(50); | |
| SwitchControlLibrary().ReleaseButtonB(); | |
| delay(200); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment