New to programming. As i downloaded this code, particle went offline. I used a timer to avoid “flood data” on Blynk server. Now the Photon is not communicating with the cloud. Need to download the firware via USB cable ?
Thanks in advance to the Particle community !!
@Omer, it is not a good idea to call network functions within a timer (eg. led0.on() ). Instead, set a flag that you can read in loop() which then calls the functions. One word of caution - the code as you have it will call led0.on() or led0.off() at 500ms intervals. You may want to set a previous_state with which you can set the led only when the state of the door sensor changes.
The easiest way to recover your Photon is to put it in SAFE mode and then reflash it with your new code.
Does it looks similar to my code (to some extent) ? User is writing multiple times on to the Blynk server but i guess the frequency is 1 sec, where as i was using sampling rate of 500 msec.