Is it the same when using ESP8266 as a separate module that A2 and A3 should not be used?
As @DrAzzy says, yes. The wiring for the Espruino WiFi isn't exactly the same as the shim (so that you have a few more analogs available), but A2+A3 are some of the only UART pins so have to be used.
Probably the easiest thing is to figure out which analogs you want to use, and then put them in an array: var ANALOGS = [A0,A1,A4,A5,...]. You can then just do analogRead(ANALOGS[...]) in your code, which might be a bit more readable.
The whole pin naming is a bit confusing, but Espruino boards use the pin names provided by the chip's manufacturer rather than making up new ones. It's a pain when starting off but makes it a whole lot easier and less confusing if you move on to more advanced things.
It would be nice if there were a way to warn the user when they yanked pins out from under something
Hmm - interesting idea... I wonder whether that would get annoying for some users? I guess there could be a way to explicitly disable it though.
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.
As @DrAzzy says, yes. The wiring for the Espruino WiFi isn't exactly the same as the shim (so that you have a few more analogs available), but A2+A3 are some of the only UART pins so have to be used.
Probably the easiest thing is to figure out which analogs you want to use, and then put them in an array:
var ANALOGS = [A0,A1,A4,A5,...]
. You can then just doanalogRead(ANALOGS[...])
in your code, which might be a bit more readable.The whole pin naming is a bit confusing, but Espruino boards use the pin names provided by the chip's manufacturer rather than making up new ones. It's a pain when starting off but makes it a whole lot easier and less confusing if you move on to more advanced things.
Hmm - interesting idea... I wonder whether that would get annoying for some users? I guess there could be a way to explicitly disable it though.