Just another thing (not sure if it helps) but instead of storing the pin number in the pin (which isn't really used) you could actually store the mask (1<<b) instead and make the code a bit neater?
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.
Just another thing (not sure if it helps) but instead of storing the pin number in the pin (which isn't really used) you could actually store the mask (
1<<b
) instead and make the code a bit neater?