Avoiding compatibility issues when sharing sketches between ESP32 and ESP8266
I learned that you can use macros to automatically decide which library based on which device is being used. This lets you avoid a lot of work when switching between boards.