I cant figure out why when my round times out, the core keeps crashing with 11 red blinks. Theres no compiler error and Im not sure whats causing it.
void loop() {
//wait for race to end
if(!raceEnded) {
//wait for all lanes to have times (this includes any empty lanes, which will timeout at 20 seconds)
if((timeEnd1 != timeStart1 && timeEnd2 != timeStart2 && timeEnd3 != timeStart3 && timeEnd4 != timeStart4) || (millis() - startTime) > DISQUALIFIED_TIME) {
if(timeEnd1 <= timeStart1) {
Spark.publish("round/target1","MISS");
}
delay(50);
if(timeEnd2 <= timeStart2) {
Spark.publish("round/target2","MISS");
}
delay(50);
if(timeEnd3 <= timeStart3) {
Spark.publish("round/target3","MISS");
}
delay(50);
if(timeEnd4 <= timeStart4) {
Spark.publish("round/target4","MISS");
}
Serial.println("Round Finished!");
//cleanup
raceEnded = true; // prevents results from being displayed over and over
EXTI_ClearITPendingBit(EXTI_Line5); // D2 "startRace"
NVIC_EnableIRQ(EXTI9_5_IRQn); // D2
digitalWrite(TRIGGER_GAME_PIN, LOW); //lower trigger led
// Enter waiting state, waiting for D2 to go low.
Serial.println("================================");
Serial.println("Waiting for round to start.");
}
}