My first Topic here but I always find a solution when searching but for now, I need advice.
My setup :
I use Photon and Electron with sensors and I make a Particle.publish every 5 minutes (In the Loop statement, I have a delay set to (300000) and my function to publish is called
I created a WebHook (particle Cloud) to retrieve my data on my server
I also have a function to control my Relays shield using a web page
Question :
I need to add to my setup a reed switch, and when the value change, I need to call my function publish. How is the best way to achieve sending every 5 minutes my publish function and manually send a publish when reed switch value change ?