You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use these two lines at the start of many of my Arduino and ESP sketches to turn Serial.print on or off with one #define statement.:
#define DEBUG true //set to true for debug output, false for no debug output
#define Serial if(DEBUG)Serial
It works. Except when I add #include <ESP8266WiFi.h>. I then get a compile error:
expected primary-expression before 'if'
It's not a show-stopper because the "feature" is simply a convenience, but examining the cpp code in the library is a bit above my skill level. I am simply curious what is in the ESP8266WiFi.h that would prevent me using the debug lines?
The text was updated successfully, but these errors were encountered:
This is not an issue more than a curiosity.
I use these two lines at the start of many of my Arduino and ESP sketches to turn Serial.print on or off with one #define statement.:
It works. Except when I add #include <ESP8266WiFi.h>. I then get a compile error:
expected primary-expression before 'if'
It's not a show-stopper because the "feature" is simply a convenience, but examining the cpp code in the library is a bit above my skill level. I am simply curious what is in the ESP8266WiFi.h that would prevent me using the debug lines?
The text was updated successfully, but these errors were encountered: