You can just do Object.keys(global) I think. The pins themselves aren't listed, but you could try getPinMode(0)/1/2/... all the way up until you get an exception (since getPinMode won't change pin state)
But again, if you just try what you did above with all pins you could damage your board (and will definitely break USB), as you have no idea what they're connected to when you set them to something.
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.
You can just do
Object.keys(global)
I think. The pins themselves aren't listed, but you could trygetPinMode(0)/1/2/...
all the way up until you get an exception (since getPinMode won't change pin state)But again, if you just try what you did above with all pins you could damage your board (and will definitely break USB), as you have no idea what they're connected to when you set them to something.