[Solved] Issue with #defines. It's SPARK not SPARK_CORE

Hey everyone. This is probably a very simple problem but I’m having an issue using the #define directive.

I have the following lines:

#elif defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) || defined(SPARK_CORE)
    #error "Unsupported processor type!"

I always get the “Unsupported processor type” error. Even if I include my own #define SPARK_CORE 1 at the top of my application.cpp. What the heck am I doing wrong?

Just to be arkward, could you show the first #if, too?

Have you tried SPARK instead of SPARK_CORE?

1 Like

@harrisonhjones, as @ScruffR indicated, the correct processor flag is SPARK. :slight_smile:

1 Like

Thanks @ScruffR and @peekay123! Not sure how I missed that difference.

Glad it worked :+1:

But it’s still odd that your own #define SPARK_CORE 1 didn’t work either :thought_balloon: :question:, but maybe you could try without 1

I ended up putting it in the .h file instead of the .cpp and it worked. My mistake