Hello everyone!
I’m making an intrusion alarm system on my Particle Photon. My problem is that the Photon won’t be able to read sensors while it is connecting and I’m trying to avoid that.
Now, I initially though about using a hardware interrupt that checks the sensors and sends a disconnect() in case the state of a pin the sensor is connected to changes (because, according to the reference, “This connection will block execution of loop() or setup() until either the device connects to the Cloud or an interrupt is fired that calls Particle.disconnect().”, at least when in semi-auto mode).
A couple of days ago I found out about System Threading and the SYSTEM_THREAD(ENABLED); function.
Reference does mention SOME functions are executed on other thread but does not mention anything about the connection process.
What I’m wondering is: will connection still block code in the loop() function? Do I just stick to hardware interrupts and the disconnect() method?
Thank you!