Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created June 11, 2017 16:41
Show Gist options
  • Save CreateRemoteThread/6b2c054c186306825abce7e3308a8682 to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/6b2c054c186306825abce7e3308a8682 to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(115200);
pinMode(13,OUTPUT);
digitalWrite(13,HIGH);
delay(10000);
Serial.println("GLITCH RDY");
}
int glitchCtr = 0;
int secCtr = 1;
void loop() {
// put your main code here, to run repeatedly:
if(glitchCtr > 2000000)
{
Serial.print("DUMPING POWER FOR ");
Serial.println(secCtr);
digitalWrite(13,LOW);
// try to pass time.
int waste = 0;
for(int i = 0;i < secCtr;i++)
{
waste++;
}
secCtr *= 2;
digitalWrite(13,HIGH);
glitchCtr = 0;
}
else
{
glitchCtr++;
digitalWrite(13,HIGH);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment