init
This commit is contained in:
29
connect_switch.ino
Normal file
29
connect_switch.ino
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#include <SwitchControlLibrary.h>
|
||||||
|
|
||||||
|
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++;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user