-
• #2
Hi, there's quite a bit of documentation on setWatch in the Espruino reference: http://www.espruino.com/Reference#l__global_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,debounce:50});
-
• #4
Hi - that's to be expected - the button is actually connected to pin D0 - so
BTN == D0
. It's just that when you print it, Espruino chooses to printD0
and notBTN
to the screen -
• #6
Has your client updated to the 1v92 firmware? That could be an issue
-
• #7
Can you share us the link how to do this.
-
• #8
http://www.espruino.com/Puck.js#firmware-updates
Type
process.version
on the LHS of the Web IDE to check -
• #10
Mr. Harry, i would like to make a counter and keep track of time interval between every click, if possibile in serverless way just using a webpage ... as You expert in button of puckjs can send me some suggestion or code examples, i'm truly newbie in js etc. BR
Sincerely
Carlo
Hi All,
I am getting some issues with my code to handle the button event on the puck js. I think puck is too sensitive that its button event is fired even on movement of device. How can i improve this. Is their any documentation for what are all possible options we can pass to
Code which i am using is as followed. Please
Should i use debounce, Can you give me some idea about debounce what is use of this.