Closed dstroy0 closed 2 years ago
I often see examples that cover a wider range of specific features by using
#ifdef ARDUINO_ARCH_ESP8266
// do stuff for WiFi
#endif
// do stuff for any platform
I'm sure there are ways to find out if the board selected has WiFi by using ARDUINO_ESP8266
or something like that. The macros that are used for each board are often located in the corresponding Arduino core's boards.txt. I think the TARGET_NANO_RP2040_CONNECT
macro would be good for the Nano Connect board. Other boards whose main processors have WiFi will be easier to identify.
awesome, I'll work on those portability directives and roll those examples into all_platforms
For most of the examples, the only real difference is the wifi lib so I think it would make sense to consolidate "universal" examples to a third folder within examples "all_platforms". This will make maintenance easier, by reducing repetitive examples.