So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By themrmurray
#68397 So, Arduino pins can be defined by an int variable, but what variable type would I use for the Dx notation of the 8266 in Arduino IDE?

Ex:
int pin = 14;
vs.
??? pin = D7;

Obviously I could just use the Arduino pin numbers, but for convenience it would be nice to use 8266 notation.
User avatar
By rudy
#68400 I compile with the Generic ESP8266 module selection. When setting up the pin I use the GPIO number of the pin.

Code: Select allconst int voltPin = A0;       //  Only analog pin
const int ledPin =  15;       //  LED pin on GPIO15
const int relayPin = 4;       //  LED pin on GPIO4


If you define your board as a different type, NodeMCU for example, then a Dx number scheme is available. Renumbering port pins so that pins on the board are in sequence.

Image