[Solved] Really strange compilation error

The Spark Preprocessor is at it again! By disabling the preprocessor (and remembering to include “application.h”) I was able to get your exact code working

#pragma SPARK_NO_PREPROCESSOR
#include "application.h"

bool turnedLeft = false;
bool turnedRight = false;
unsigned long lastChange = 0;

void setup() { }

void loop() 
{
    if(turnedLeft || turnedRight) 
    {
        lastChange = millis();

        if(turnedLeft) { }
        else if(turnedRight) { }
    }
}
1 Like