I have a program that contains code that will run on the electron but not the photon, is there any way to check the board type programmatically? Something like:
#if BOARD_ELECTRON dostuff() #endif
I have a program that contains code that will run on the electron but not the photon, is there any way to check the board type programmatically? Something like:
#if BOARD_ELECTRON dostuff() #endif
That would be the PLATFORM_ID
0 ... Spark/Particle Core
6 ... Particle Photon
8 ... Particle P1
10 ... Particle Electron
88 ... RedBear Duo
But what exactly do you want to target?
Sometimes it’s better to check for the presence of a particular feature than relying on the platform, since new hardware might provide the same feature but have a yet unknown PLATFORM_ID
and hence your code would fail to support the hardware although it would be available.
Confirmed:
and:
82 ... Digistump Oak
103 ... Bluz DK
I was just looking up bluz and totally forgot Oak (since I haven’t got mine yet )