Files
connect_switch/connect_switch.ino
2020-09-06 17:02:45 +09:00

31 lines
409 B
C++

#include <MsTimer2.h>
#include <SwitchControlLibrary.h>
int loopCount = 0;
int state = 0;
void button() {
if (state == 0) {
SwitchControlLibrary().PressButtonA();
state = 1;
}
else {
SwitchControlLibrary().ReleaseButtonA();
state = 0;
}
}
void setup()
{
SwitchControlLibrary();
MsTimer2::set(17, button);
MsTimer2::start();
}
void loop()
{
}