You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi, there's quite a bit of documentation on setWatch in the Espruino reference: http://www.espruino.com/Reference#l__glo­bal_setWatch

    Yes you should use debounce, as it stops those multiple events caused by the physical contacts in the button bouncing together and apart. I tend to use 50 (milliseconds) as a reasonable start value.

    setWatch(function(){
    },BTN,{edge:"rising",repeat:true,debounc­e:50});
    
About

Avatar for Gordon @Gordon started