• 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.

    Did I miss something ?

    Thank you a lot for your help :)

About

Avatar for Antoine @Antoine started