I have been trying to write a robust, minimal TCP client server example that is less trivial (and easier to read across to the real world) than the one in the documentation. My aim is to write something that will survive temporary loss of the cloud or local wifi. If someone already has this - great, please can we have a copy in “Getting Started”.
At the moment my simple code doesn’t survive temporary loss of wifi but needs a power cycle (as against reset) to recover. I’ll write to a separate topic about that when I have experimented a bit more.
I had limited success compiling with the particle dev system. This is what I usually use, but for moving backwards and forwards between two pieces of code for a pair of devices it crashed almost as often as the core/photon pair that were trying to talk to each other. Consequently I moved back to compiling using Particle Build.
The first thing that I found was that my code no longer compiled.
Build does not recognise:
TCPServer server = TCPServer(23); ... ... server.printlnf("Elapsed time is: %f ",millis()/1000.0);
while particle dev is perfectly happy with it.
It is no great issue in itself but I had assumed that compiling using Build and particle dev would use the same compiler with the same quirks but clearly not. Is there a plan to harmonise compilers? How can we tell which compiler is more up-to-date and less quirky?