You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"description" : ["Call the function specified when the pin changes",
250
-
"The function may also take an argument, which is an object containing a field called 'time', which is the time in seconds at which the pin changed state, and 'state', which is the current state of the pin",
251
-
" This can also be removed using clearWatch" ],
250
+
"The function may also take an argument, which is an object of type `{time:float, lastTime:float, state:bool}`.",
251
+
"`time` is the time in seconds at which the pin changed state, `lastTime` is the time in seconds at which the pin last changed state, and `state` is the current state of the pin.",
252
+
"For instance, if you want to measure the length of a positive pusle you could use: ```setWatch(function(e) { console.log(e.time-e.lastTime); }, BTN, { repeat:true, edge:'falling' });```",
253
+
"This can also be removed using clearWatch" ],
252
254
"generate" : "jswrap_interface_setWatch",
253
255
"params" : [ [ "function", "JsVarName", "A Function or String to be executed"],
0 commit comments