You are reading a single comment by @DrAzzy and its replies. Click here to read the full conversation.
  • You should be able to analogRead() on an ESP8266. There's only that one ADC pin, but last I checked reading from it worked fine.

    You don't need to do pinMode(). Actually, with Espruino, you don't need pinMode() at all for doing basic GPIO - if pinMode() hasn't been called yet on the pin, digitalRead() will set it as input and digitalWrite() will set it as output. If pinMode() has been called already, it will leave it as is.

    As an aside, you don't need to use pinMode() before analogRead in Arduino-land either, since pins start as inputs (at least for AVRs; I think same is true for ESP8266 though)

About

Avatar for DrAzzy @DrAzzy started