Is there a #ifdef test for detecting particle devices?

Exactly that (or the nicer looking #if defined(PARTICLE) :wink: )
In addition to that you can drill down via PRODUCT_ID and other “secondary” defines like Wiring_WiFi, Wiring_Cellular (defined in spark_wiring_platform.h )
Or you use the HW specific defines like STM32F2XX (in that thread SPARK is mentioned which still works but was superceded by PARTICLE)

2 Likes