Created
June 11, 2017 16:41
-
-
Save CreateRemoteThread/6b2c054c186306825abce7e3308a8682 to your computer and use it in GitHub Desktop.
This file contains 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
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