dstroy0 / InputHandler

Arduino input handler
https://dstroy0.github.io/InputHandler/
GNU General Public License v3.0
1 stars 0 forks source link

Example consolidation #37

Closed dstroy0 closed 2 years ago

dstroy0 commented 2 years ago

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.

2bndy5 commented 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.

dstroy0 commented 2 years ago

awesome, I'll work on those portability directives and roll those examples into all_platforms