Open LZY-SPCA opened 3 months ago
Hi there,
sorry to hear that. Unfortunately I can not give any meaningful hint on that from my perspective:
So most likely the issue can not be fixed by any fix on this library. For further investigation:
On a side note: I found the HC-SR501 to be very unreliable (false triggers) and power consuming (not suitable for battery usage). I found a better solution with Panasonic PIRs (for instance EKMB1301111K, see https://asset.conrad.com/media10/add/160267/c1/-/en/001541128DS01/datenblatt-1541128-panasonic-pir-bewegungssensor-ekmb1301111k-23-4-v-1-st.pdf). Note that I am in no way affiliated with Panasonic. There might be others equally good by other manufactureres as well of course that I don't know.
I tried to use HC-SR501, camera and MQTT to make a smart home sensory node. After the sensor triggered irq, the isr set a flag to true and then the loop will check the flag and try to publish a message. But during the publish process, the system paniced.