I’m experiencing an issue where, after I include the SPARKFUN_PHOTON_WEATHER_SHIELD_LIBRARY in my project, I can no longer define string macros (preprocessor constants). It’s definitely related to the inclusion of this library as the following code is valid prior to inclusion and invalid after inclusion, with the error: token ““ELECTRON”” is not valid in preprocessor expressions.
#define DEVICE_FAMILY "ELECTRON"
void setup() {
#if DEVICE_FAMILY == "ELECTRON"
Particle.publish("Hello World");
#endif
}
void loop() {
}
Can anyone explain why this is happening and how to fix the error?