Known issue: long delays or blocking code kills the connection to the Cloud

That’s true, our answers said the same thing, although they were worded differently. Basically:

  1. It’s ok to use long delay()s because in recent versions of the firmware, delay() calls a background task that services the Wi-Fi module’s connection to the cloud
  2. Passive delays by counting millis() is better practice
  3. Code that blocks without calling Spark’s background task (like while(1){}) will still kill the connection

Does that help clear things up?

3 Likes