In order to achieve a bidirectional protocol (PS/2 mouse), I have to simultaneously monitor a pin with a setWatch, and drive it (open drain with external pull-ups).
I set this pin LOW with digitalWrite(X,false), and HIGH with pinMode(X,'input') (External pullup drives it HIGH ).
What is happening with the previously declared setWatch on this pin? Does it remains active or is it discarded as soon as I drive this pin with digitalWrite?
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.
In order to achieve a bidirectional protocol (PS/2 mouse), I have to simultaneously monitor a pin with a setWatch, and drive it (open drain with external pull-ups).
I set this pin LOW with digitalWrite(X,false), and HIGH with pinMode(X,'input') (External pullup drives it HIGH ).
What is happening with the previously declared setWatch on this pin? Does it remains active or is it discarded as soon as I drive this pin with digitalWrite?