Hey. Thanks. I didn't know about the built-in pull-down resistors. I've given that a go.
I found this page with a load of information.
http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/
It says "the device requires nearly a minute to initialize". So that may have been part of the problem.
I think it's working now. Thanks.
@jjok started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hey. Thanks. I didn't know about the built-in pull-down resistors. I've given that a go.
I found this page with a load of information.
http://henrysbench.capnfatz.com/henrys-bench/arduino-sensors-and-input/arduino-hc-sr501-motion-sensor-tutorial/
It says "the device requires nearly a minute to initialize". So that may have been part of the problem.
I think it's working now. Thanks.