setWatch - feature request #410
Unanswered
espruino-discuss2
asked this question in
Interfacing
Replies: 3 comments
-
Posted at 2014-03-30 by Sacha Workaround with inline function: setWatch(function(e) { myfunction(B12,e); },B12,{repeat: true, debounce: 20}); Sacha |
Beta Was this translation helpful? Give feedback.
0 replies
-
Posted at 2014-03-31 by @gfwilliams Thanks - yes, that'd be a good addition. I'll add it to the todo list :) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Posted at 2014-03-31 by Sacha Perfect. Thanks Sacha |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2014-03-30 by Sacha
Hi Gordon,
When the callback function of setWatch is called, an object is passed with the following variables:
"time", "lastTime", "state"
Please include "pin". I would like to use the same callback function multiple times for several pins. So we need to know the pin as well.
Many thanks
Sacha
Beta Was this translation helpful? Give feedback.
All reactions