When thinking about it more, on one side it would be nice to e.g. add your own button or LED to e.g. MDBT42Q and do
LED1 = new LED(D16,{inverted:true})
currently those are only hardcoded.
On the other hand the easiest method with just exposing inverted flag I can still have BTN1 and D27 to be same object and when I disconnect the jumper on that E104 board to use the pin directly I could flip the inverted flag to use pin as ordinary pin in sane way - e.g. as CS pin and pull it low by setting it to 0.
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.
When thinking about it more, on one side it would be nice to e.g. add your own button or LED to e.g. MDBT42Q and do
currently those are only hardcoded.
On the other hand the easiest method with just exposing inverted flag I can still have BTN1 and D27 to be same object and when I disconnect the jumper on that E104 board to use the pin directly I could flip the inverted flag to use pin as ordinary pin in sane way - e.g. as CS pin and pull it low by setting it to 0.