HC-SR04 module should start with trigger pin LOW

Posted on
  • Just tried out the HC-SR04 module. As soon as require("HC-SR04").connect(...) is called the sensor fires off and logs the distance - without waiting for sensor.trigger().
    I suggest to correct the module code to include trig.write(0) as the first line.

  • Thanks - I've just done that. I'm surprised though - pretty sure the modules I had never did this, but perhaps more recent ones have skipped a pull-down resistor on the inputs.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

HC-SR04 module should start with trigger pin LOW

Posted by Avatar for Steffen @Steffen

Actions