• I finally solved this problem by using an external pull-up resistor at the physical level, and the software should be written like this.

     setWatch(callback, pin, {
            edge: (-1),
            repeat: true,
            debounce: 50
      });
    
About

Avatar for lenxu @lenxu started