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 });
@lenxu 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.
I finally solved this problem by using an external pull-up resistor at the physical level, and the software should be written like this.