I think holding on to a reference to the pin could be a bit painful - however your idea of setWatch passing the object back through sounds absolutely perfect, and pretty easy to implement. When I have a free moment I'll have a go at implementing it.
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.
Thanks - I've just filed an issue for that here: https://github.com/espruino/Espruino/issues/1268
I think holding on to a reference to the pin could be a bit painful - however your idea of
setWatch
passing the object back through sounds absolutely perfect, and pretty easy to implement. When I have a free moment I'll have a go at implementing it.