-
• #3
Hi MaBe,
Thanks for the heads-up :)
I'm gonna try this.
-
• #4
Issue resolved :)
I tried a digital pin without any success :(
I tried an other HC-SR501 and it worked. So my sensor was definitely broken.
here the code that's working :
setWatch(function() { console.log("Movement detected at : ", Math.floor(Date.now() / 1000) ); }, NodeMCU.D6, {repeat:true, edge:"rising"});
Hi everyone, I'm trying to read a HC-SR501 with my nodeMCU but I struggle a bit :(
Wiring :
VCC to vin (5V)
OUT to A0
GDN to GDN
I tried :
Never got any detection
I tried
I swapped the sensor for a water level sensor and
console.log( analogRead(NodeMCU.A0) );
and the water level is detected normally.Did I miss something ?
Thank you a lot for your help :)