what happens if you do pinMode(pin,"opendrain"); and then digitalWrite() to the pin?
Does that not give the desired effect? digitalWrite() should not change the pin mode if you've set it with pinMode().
@DrAzzy started
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.
what happens if you do pinMode(pin,"opendrain"); and then digitalWrite() to the pin?
Does that not give the desired effect? digitalWrite() should not change the pin mode if you've set it with pinMode().