Any pin which you have connected to the ESP8266 should not be used for any other purpose. I don't know how you wired it - if you're using the Pico shim, it does use those same pins (see the pinout chart in http://www.espruino.com/ESP8266 ); I think the pico shim pinout was recycled for the WiFi. If you are not using the Pico shim, only you know which pins you have it connected to.
There is not a way to detect if a pin is already "used" for something else. As Gordon noted, the pinout chart marks which ones are unavailable on the board, before you start connecting stuff to it.
Once you start connecting other devices to it, it's your responsibility to know which pins you connected things to - I can't think of a good way to make it warn you about using pins that aren't available because you've already connected them to something else.
It would be nice if there were a way to warn the user when they yanked pins out from under something - maybe an E.warnOnModeChange(pin) call that could be put into a module to mark those pins as being used for 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.
Any pin which you have connected to the ESP8266 should not be used for any other purpose. I don't know how you wired it - if you're using the Pico shim, it does use those same pins (see the pinout chart in http://www.espruino.com/ESP8266 ); I think the pico shim pinout was recycled for the WiFi. If you are not using the Pico shim, only you know which pins you have it connected to.
There is not a way to detect if a pin is already "used" for something else. As Gordon noted, the pinout chart marks which ones are unavailable on the board, before you start connecting stuff to it.
Once you start connecting other devices to it, it's your responsibility to know which pins you connected things to - I can't think of a good way to make it warn you about using pins that aren't available because you've already connected them to something else.
It would be nice if there were a way to warn the user when they yanked pins out from under something - maybe an E.warnOnModeChange(pin) call that could be put into a module to mark those pins as being used for something?