Skip to content

Instantly share code, notes, and snippets.

@CreateRemoteThread
Created June 11, 2017 16:41
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CreateRemoteThread/50fbe8062342137196214e155d4024dc to your computer and use it in GitHub Desktop.
Save CreateRemoteThread/50fbe8062342137196214e155d4024dc to your computer and use it in GitHub Desktop.
int led1 = 2;
int led2 = 3;
void setup() {
Serial.begin(115200);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
for(int i = 0;i < 3; i++)
{
flashGreen(100);
delay(500);
}
for(int k = 0;k < 3;k++)
{
flashRed(100);
delay(500);
}
Serial.println("GLITCH TARGET RDY");
}
void flashGreen(int l)
{
digitalWrite(led1,HIGH);
delay(l);
digitalWrite(led1,LOW);
}
void flashRed(int l)
{
digitalWrite(led2,HIGH);
delay(l);
digitalWrite(led2,LOW);
}
void loop() {
int x = 0;
int y = 0;
double sum = 0;
for(x = 0;x < 500; x++)
{
for(y = 0;y < 500;y++)
{
sum++;
}
}
Serial.print("500 * 500 = ");
Serial.println(sum,DEC);
if(sum != 250000.0000000)
{
flashRed(100);
}
else
{
flashGreen(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment