https://saptaji.com/2022/02/15/detecting-motion-using-the-hc-sr501-passive-infra-red-pir-sensor-and-nodemcu/
Detecting Motion Using the HC-SR501 Passive Infra-Red (PIR) Sensor and NodeMcu