Loop not getting called when using SYSTEM_THREAD(ENABLED)

Some time ago now I detailed my trouble with an Electron exhibiting this behavior, at the time I stated the firmware worked fine on the Photon, turns out that wasn’t actually true. For my photon devices there was always an excellent WiFi signal present so there was only an imperceptible delay while the device connected. As I had already moved on from checking the device ran with no signal in previous updates of my code, I neglected to check it in more detail. Other N issues I didn’t see because I have an Asus router with “b/g protection” & 20Mhz only enabled which I think makes it work with devices like this better.

If I recompile my software for Firmware 0.6.3(photon) or 0.6.4(electron) I’m back to having fully working devices that run loop() without a connection. So I don’t think this is a Wireless-N issue, I think its a v0.7+ issue and it kicks in when a program reaches a certain level of complexity or size. A test program that just cycles inputs and displays readings on a display works just fine on 0.7.0 in threaded mode.

2 Likes