How to auto select a target when cloud compiling?

How can I include code to be used on one platform/device Vs another when compiling?

Specifically, I want to include a Particle.function that sets SSID/Password when targeting the photon, but not for the electron.

You can use PLATFORM_ID or any of the related defines for conditional compiling (#if defined())

1 Like