I am in the process of creating an automated garden watering system with Blynk and a Particle Photon. I seem to be having an issue where the device goes offline between updating values on my Blynk app. The values update every 5 seconds or so, but after they update I get the notification “Photon is offline” for the next 5 seconds. Then it goes away, my values update, and it goes “offline” again. I was wondering if there was a fix for this, as I wanted to use Push notifications for when my hardware goes offline, but I don’t want to do that as of now because of the issue I’m having. Any suggestions would be greatly appreciated!
So you’re saying that the only things I should have in my main loop are the timer method calls and the Blynk.run() where all of the functions I want to perform are in timer methods?
Costas, I took your suggestion but I still seem to be having problems. I thought it could have to do with the the DHT library, but I’ve eliminated all instances using those functions in my code to try and isolate the problem without luck. My sensor values aren’t even updating in the Blynk app, and I still get the “Photon is offline” warning on the app. Anything else I could be doing wrong?
Still no luck. The first 3 pinMode’s are soil moisture sensors and the 4th one is a photoresistor. The D7 is just for the onboard LED so I know the sketch is running.