Skip to content

Pinout ESP8266-12E NodeMCU

    The pin assignment of the NodeMCU with 30 PINs is shown here. For the sake of clarity, this is a simplified representation. As a rule, many PINs are assigned more than once. I will go into this in more detail.

    PinOut ESP8266

    Here is a brief description of the function of the PINs.

    PIN DesignationInputOutputRemark
    A0 – ADCAnalog iIputNo OutputMeasurement of analog values
    D0 – GPIO 16No Interruptno PWM or I2CHigh when booting!
    Low – WakeUp from DeepSleep
    D1 – GPIO 5Digital InputDigital OutputSCL for I2C at the same time
    D2 – GPIO 4Digital InputDigital OutputSDA for I2C at the same time
    D3 – GPIO 0Pull UPDigital OutputIs connected to flash button. LOW prevents booting
    D4 – GPIO 2Pull UpDigital OutputHigh when booting! Is connected to onboard LED. No booting at LOW
    D5 – GPIO 14Digital InputDigital OutputSerial Peripheral Interface
    SLCK (Serial Clock) – Clock line generated by the master
    D6 – GPIO 12Digital InputDigital OutputSerial Peripheral Interface
    MISO (Master In Slave Out)
    Data from slave to master
    D7 – GPIO 13Digital InputDigital OutputSerial Peripheral Interface
    MOSI (Master Out Slave In)
    Data from master to slave
    D8 – GPIO 15Pull DownDigital Output (restricted)Serial Peripheral Interface
    CS (Chip Select) – Activation Slave – No booting at HIGH!
    RX – GPIO 3Digital Input (restricted)RXHIGH when booting
    TX – GPIO 1TXDigital Input (restricted)HIGH when booting. Debug faulty if LOW
    Inspiration and source: Random Nerd Tutorials

    The most important functions of the individual PINs are shown above. The table also makes it clear what results we can expect from the assignment.

    The I2c interface should be emphasized here. This is not a hardware interface, but is implemented via software.


    A0 – Analog input

    The ESP8266 12-E NodeMCU kit supports analog reading with PIN A0 or ADC0. Please note that this PIN has a maximum input voltage of 0-3.3 volts. Other ESP8266 boards only tolerate 0-1 volts. Please refer to the data sheet for your board.

    Other PINs with multiple use

    GPIO6 to GPIO11 are usually connected to the chip for flashing. These should not be used for other purposes.

    GPIO0 is also labeled FLASH in the image above. This also corresponds to pressing the FLASH button.

    GPIO0, GPIO1, GPIO2, GPIO3, GPIO9, GPIO10, GPIO15, GPIO16 assume certain levels during the boot process. Please refer to the table above under Remarks to find out which levels these are.
    Please note that a connected relay, for example, can switch uncontrollably during the boot process if the level at the PIN becomes high or low.

    The RST PIN is used to reset the board. The reset corresponds to pressing the RST button on the board.

    A board that has been put into deep sleep can be woken up again via GPIO16 (WAKE). To do this, the PIN must be connected to the RST PIN.

    In addition to the functions mentioned, the PINs GPIO0 to GPIO15 can be used for pulse width modulation (PWM). There will be a more detailed article on this.

    This will give you a basic understanding of which PINs you can use safely and which PINs you should be careful with.


    0 Kommentare
    Inline Feedbacks
    View all comments