#include #include int loopCount = 0; int state = 0; int table[40] = {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; int index = 0; void perms() { if (table[index] == 1){ SwitchControlLibrary().PressButtonA(); } if (table[index] == 2){ SwitchControlLibrary().ReleaseButtonA(); } index = (index + 1) % 40; } /* void button() { if (state == 0) { SwitchControlLibrary().PressButtonA(); state = 1; } else { SwitchControlLibrary().ReleaseButtonA(); state = 0; } } */ void setup() { SwitchControlLibrary(); MsTimer2::set(1, perms); MsTimer2::start(); } void loop() { }