Yet another TCPClient example (but this one works!)

It is examples such as these which I recently requested elsewhere. Thank you. I am pleased to see that a lot of what amounts to superstitious programming (throwing in random waits and calling functions which ought not be necessary, e.g. checking that the WiFi is up as well as checking Spark.connected) is not featured in your example. You use the functions provided(^) as intended and all seems to work. This is great and should be welcomed by all as all ought to be in favour of demystifying the programming of the Spark Core.

(^) However the function Spark_WLAN_Loop() is not documented and its use is deprecated. And @zach has written we should just use the intended function, viz. Spark.process(). Some here insist on using the function you use. I think it has the appearance and effect of driving a wedge between an inner crowd and ordinary punters - things like this have the appearance of only allowing things to work if you ask for help from an expert in the forum first. How else would you know of this apparently necessary function which is not actually intended for application programming. Or, if it is necessary, then it must be documented. IM(not so H)O

1 Like