Code Compatibility with new Hardware

Hi all,

First, let me say I am very excited about the new hardware and I have already placed my pre-order. I have a few very cool ideas in our local Raleigh parks where Mesh will be a big plus.

With the new hardware, I expect that I might have a mix of current and new generation devices. Do we know how compatible the code will be across generations. I am sure the basic will work but, what about things like sleep, PMIC commands, 3G vs LTE vs NB IOT radio control and managing connectivity? Will it be possible to have one code base or will I need to start to think about having different code bases for each?

Thanks,

Chip

1 Like

Just stating the obvious and waiting for people in the know to expand on that:

Particle will do its best to keep code compatiblity as far as it goes. Which will probably be near 100% for high level code. The obvious differences will come in where you hit hardware differences like missing pins or features (e.g. no DACs, only 6 analog pins, no SPI2, …) or different supporting chips (e.g. PMIC - but since I haven’t seen the BOM, I can’t tell whether it’s the same or not).

But you should still be able to stick with one code base.
In the “worst” case, you can add conditional compile blocks which check for the target platform.
This is what the system does all over the place and I do in my own projects when targeting Photons and Electrons with one code base.

3 Likes