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 :
setWatch(function() { console.log("Movement detected"); }, NodeMCU.A0, {repeat:true, edge:"rising"});
Never got any detection
I tried
setInterval( () =>{ console.log( analogRead(NodeMCU.A0) ); // print 0.00097751710 all the time },1000);
I swapped the sensor for a water level sensor and console.log( analogRead(NodeMCU.A0) ); and the water level is detected normally.
console.log( analogRead(NodeMCU.A0) );
Did I miss something ?
Thank you a lot for your help :)
@Antoine 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.
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 :)