Skip to content

Instantly share code, notes, and snippets.

@dvinciguerra
Created July 24, 2022 18:19
Show Gist options
  • Save dvinciguerra/00f8e48046e62c137e4f689eb5d1e38e to your computer and use it in GitHub Desktop.
Save dvinciguerra/00f8e48046e62c137e4f689eb5d1e38e to your computer and use it in GitHub Desktop.
ESP8266 pin mapping
/**
* Reference:
* https://randomnerdtutorials.com/esp8266-pinout-reference-gpios
*/
// esp8266-01
// #define GPIO0 00
// #define GPIO1 01
// #define GPIO2 02
// #define GPIO3 03
// #define TX_PIN GPIO1
// #define RX_PIN GPIO3
// #define FLASH_PIN GPIO0
// esp8266 12-E
// #define GPIO0 00
// #define GPIO1 01
// #define GPIO2 02
// #define GPIO3 03
// #define GPIO4 04
// #define GPIO5 05
// #define GPIO6 06
// #define GPIO7 07
// #define GPIO8 08
// #define GPIO9 09
// #define GPIO10 10
// #define GPIO11 11
// #define GPIO12 12
// #define GPIO13 13
// #define GPIO14 14
// #define GPIO15 15
// #define GPIO16 16
// nodemcu
#define D0 16 // high at boot (no PWMm or I2C support)
#define D1 05 // SCL
#define D2 04 // SDA
#define D3 00 // boot failure if pulled LOW
#define D4 02 // high at boot and boot failure if pulled LOW (on-board led)
#define D5 14
#define D6 12
#define D7 13
#define D8 15 // boot failure if pulled HIGH
#define RX 03 // rx pin high at boot
#define TX 01 // tx pin high at boot and boot failure if pulled LOW
#define ADC0 A0 // analogic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment