I did a test using the first method, and it works, although it waits until the setInterval rate, so the backlight comes on, but it takes up to a second to switch to the other face. I'll have to figure out how to have the change in lock/unlock state trigger an immediate reset of the interval so the change is instantaneous.
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.
I did a test using the first method, and it works, although it waits until the setInterval rate, so the backlight comes on, but it takes up to a second to switch to the other face. I'll have to figure out how to have the change in lock/unlock state trigger an immediate reset of the interval so the change is instantaneous.