{"id":84815,"date":"2019-05-06T13:43:34","date_gmt":"2019-05-06T13:43:34","guid":{"rendered":"https:\/\/randomnerdtutorials.com\/?p=84815"},"modified":"2022-10-13T15:48:24","modified_gmt":"2022-10-13T15:48:24","slug":"esp8266-pinout-reference-gpios","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/esp8266-pinout-reference-gpios\/","title":{"rendered":"ESP8266 Pinout Reference: Which GPIO pins should you use?"},"content":{"rendered":"\n<p>This article is a guide for the ESP8266 GPIOs: pinout diagrams, their functions and how to use them.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?resize=1200%2C675&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 Pinout Reference GPIOs Pins Guide\" class=\"wp-image-84977\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/figure><\/div>\n\n\n<p>The ESP8266 12-E chip comes with 17 GPIO pins. Not all GPIOs are exposed in all ESP8266 development boards, some GPIOs are not recommended to use, and others have very specific functions.<\/p>\n\n\n\n<p>With this guide, you&#8217;ll learn how to properly use the ESP8266 GPIOs and avoid hours of frustration by using the most suitable pins for your projects.<\/p>\n\n\n\n<p class=\"rntbox rntclblue\">Note: not all GPIOs are accessible in all development boards, but each specific GPIO works in the same way regardless of the development board you\u2019re using. If you\u2019re just getting started with the ESP8266, we recommend checking out our <a href=\"https:\/\/randomnerdtutorials.com\/projects-esp8266\/\">ESP8266 Guides<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP8266 12-E Chip Pinout<\/h2>\n\n\n\n<p>The following figure illustrates the ESP8266 12-E chip pinout. Use this diagram if you\u2019re using an ESP8266 bare chip in your projects.<br><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-ESP-12E-chip-pinout-gpio-pin.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"750\" height=\"493\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-ESP-12E-chip-pinout-gpio-pin.png?resize=750%2C493&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 12-E chip pinout diagram gpios pins\" class=\"wp-image-84965\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-ESP-12E-chip-pinout-gpio-pin.png?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-ESP-12E-chip-pinout-gpio-pin.png?resize=300%2C197&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/a><\/figure><\/div>\n\n\n<p class=\"rntbox rntclblue\"><strong>Note: <\/strong> not all GPIOs are accessible in all development boards, but each specific GPIO works in the same way regardless of the development board you\u2019re using. If you\u2019re just getting started with the ESP8266, we recommend reading our guide: <a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-esp8266-wifi-transceiver-review\/\">Getting Started with the ESP8266<\/a>.<\/p>\n\n\n\n<p>At the moment, there are a wide variety of development boards with the ESP8266 chip that differ in the number of accessible GPIOs, size, form factor, etc\u2026 <\/p>\n\n\n\n<p>The most widely used ESP8266 boards are the <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/esp-01-wi-fi-board\/\" target=\"_blank\">ESP-01<\/a>, <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/tools\/esp8266-esp-12e-nodemcu-wi-fi-development-board\/\" target=\"_blank\">ESP8266-12E NodeMCU Kit<\/a>, and the <a href=\"https:\/\/makeradvisor.com\/tools\/esp8266-wemos-d1-mini-wi-fi-board\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">Wemos D1 Mini<\/a>. For a comparison of these board, you can read this guide: <a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/makeradvisor.com\/best-esp8266-wi-fi-development-board\/\" target=\"_blank\">ESP8266 Wi-Fi Development Boards comparison<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP8266-01 Pinout<\/h2>\n\n\n\n<p>If you&#8217;re using an ESP8266-01 board, you can use the following GPIO diagram as a reference.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP-01-ESP8266-pinout-gpio-pin.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" decoding=\"async\" width=\"487\" height=\"232\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP-01-ESP8266-pinout-gpio-pin.png?resize=487%2C232&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP-01 ESP8266 pinout diagram gpios pins\" class=\"wp-image-84966\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP-01-ESP8266-pinout-gpio-pin.png?w=487&amp;quality=100&amp;strip=all&amp;ssl=1 487w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP-01-ESP8266-pinout-gpio-pin.png?resize=300%2C143&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 487px) 100vw, 487px\" \/><\/a><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">ESP8266 12-E NodeMCU Kit<\/h2>\n\n\n\n<p>The ESP8266 12-E NodeMCU kit pinout diagram is shown below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"817\" height=\"542\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?resize=817%2C542&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 12-E NodeMCU Kit pinout diagram gpios pins\" class=\"wp-image-84967\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?w=817&amp;quality=100&amp;strip=all&amp;ssl=1 817w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?resize=300%2C199&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?resize=768%2C509&amp;quality=100&amp;strip=all&amp;ssl=1 768w\" sizes=\"(max-width: 817px) 100vw, 817px\" \/><\/a><\/figure><\/div>\n\n\n<h2 class=\"wp-block-heading\">Wemos D1 Mini Pinout<\/h2>\n\n\n\n<p>The following figure shows the WeMos D1 Mini pinout.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><a href=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-WeMos-D1-Mini-pinout-gpio-pin.png?quality=100&#038;strip=all&#038;ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"715\" height=\"362\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-WeMos-D1-Mini-pinout-gpio-pin.png?resize=715%2C362&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"WeMos D1 Mini Pinout diagram gpios pins\" class=\"wp-image-84968\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-WeMos-D1-Mini-pinout-gpio-pin.png?w=715&amp;quality=100&amp;strip=all&amp;ssl=1 715w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-WeMos-D1-Mini-pinout-gpio-pin.png?resize=300%2C152&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 715px) 100vw, 715px\" \/><\/a><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">Download PDF with ESP8266 Pinout Diagrams<\/h3>\n\n\n\n<p>We&#8217;ve put together a handy PDF that you can download and print, so you always have the ESP8266 diagrams next to you:<\/p>\n\n\n\n<p class=\"has-text-align-center\"><a href=\"https:\/\/s3.amazonaws.com\/randomnerdtutorials\/jhdfsASDFJEWJjsdfajdsafJDAFSJafd\/ESP8266_Pinout_Diagrams.pdf\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" class=\"button\">Download PDF Pinout Diagrams \u00bb<\/a> <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">ESP8266 Peripherals<\/h2>\n\n\n\n<p>The ESP8266 peripherals include:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>17 GPIOs<\/li><li>SPI<\/li><li>I2C (implemented on software)<\/li><li>I2S interfaces with DMA<\/li><li>UART<\/li><li>10-bit ADC<\/li><\/ul>\n\n\n\n<h2 id=\"table\">Best Pins to Use &#8211; ESP8266<\/h2>\n\n\n\n<p>One important thing to notice about ESP8266 is that the GPIO number doesn&#8217;t match the label on the board silkscreen. For example, D0 corresponds to GPIO16 and D1 corresponds to GPIO5. <\/p>\n\n\n\n<p>The following table shows the correspondence between the labels on the silkscreen and the GPIO number as well as what pins are the best to use in your projects, and which ones you need to be cautious.<\/p>\n\n\n\n<p>The pins highlighted in green are OK to use. The ones highlighted in yellow are OK to use, but you need to pay attention because they may have unexpected behavior mainly at boot. The pins highlighted in red are not recommended to use as inputs or outputs. <\/p>\n\n\n\n<figure class=\"wp-block-table rnt-responsive-table\"><table><tbody><tr><td><strong>Label<\/strong><\/td><td><strong>GPIO<\/strong><\/td><td><strong>Input<\/strong><\/td><td><strong>Output<\/strong><\/td><td><strong>Notes<\/strong><\/td><\/tr><tr><td><strong>D0<\/strong><\/td><td><strong>GPIO16<\/strong><\/td><td>no interrupt<\/td><td>no PWM or I2C support<\/td><td><span class=\"rnthl rntcorange\">HIGH at boot<\/span><br>used to wake up from deep sleep<\/td><\/tr><tr><td><strong>D1<\/strong><\/td><td><strong>GPIO5<\/strong><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td>often used as <span class=\"rnthl rntclblue\">SCL<\/span> (I2C)<\/td><\/tr><tr><td><strong>D2<\/strong><\/td><td><strong>GPIO4<\/strong><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td>often used as <span class=\"rnthl rntclblue\">SDA<\/span> (I2C) <\/td><\/tr><tr><td><strong>D3<\/strong><\/td><td><strong>GPIO0<\/strong><\/td><td>pulled up<\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td>connected to FLASH button, boot fails if pulled LOW<\/td><\/tr><tr><td><strong>D4<\/strong><\/td><td><strong>GPIO2<\/strong><\/td><td>pulled up<\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcorange\">HIGH at boot<\/span><br>connected to on-board LED, boot fails if pulled LOW<\/td><\/tr><tr><td><strong>D5<\/strong><\/td><td><strong>GPIO14<\/strong><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcblue\">SPI<\/span> (SCLK)<\/td><\/tr><tr><td><strong>D6<\/strong><\/td><td><strong>GPIO12<\/strong><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcblue\">SPI<\/span> (MISO) <\/td><\/tr><tr><td><strong>D7<\/strong><\/td><td><strong>GPIO13<\/strong><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcgreen\">OK<\/span><\/td><td><span class=\"rnthl rntcblue\">SPI<\/span> (MOSI) <\/td><\/tr><tr><td><strong>D8<\/strong><\/td><td><strong>GPIO15<\/strong><\/td><td>pulled to GND<\/td><td><span class=\"rnthl rntcyellow\">OK<\/span><\/td><td><span class=\"rnthl rntcblue\">SPI<\/span> (CS)<br>Boot fails if pulled HIGH<\/td><\/tr><tr><td><strong>RX<\/strong><\/td><td><strong>GPIO3<\/strong><\/td><td><span class=\"rnthl rntcyellow\">OK<\/span><\/td><td><span class=\"rnthl rntcred\">RX pin<\/span><\/td><td><span class=\"rnthl rntcorange\">HIGH at boot<\/span><\/td><\/tr><tr><td><strong>TX<\/strong><\/td><td><strong>GPIO1<\/strong><\/td><td><span class=\"rnthl rntcred\">TX pin<\/span><\/td><td><span class=\"rnthl rntcyellow\">OK<\/span><\/td><td><span class=\"rnthl rntcorange\">HIGH at boot<\/span><br>debug output at boot, boot fails if pulled LOW<\/td><\/tr><tr><td><strong>A0<\/strong><\/td><td><strong>ADC0<\/strong><\/td><td><span class=\"rnthl rntcgreen\">Analog Input<\/span><\/td><td><span class=\"rnthl rntcred\">X<\/span><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>Continue reading for a more detailled and in-depth analysis of the ESP8266 GPIOs and its functions. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">GPIOs connected to the Flash Chip<\/h3>\n\n\n\n<p>GPIO6 to GPIO11 are usually connected to the flash chip in ESP8266 boards. So, these pins are not recommended to use. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pins used during Boot<\/h3>\n\n\n\n<p>The ESP8266 can be prevented from booting if some pins are pulled LOW or HIGH. The following list shows the state of the following pins on BOOT:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>GPIO16: <\/strong>pin is high at BOOT<\/li><li><strong>GPIO0: <\/strong>boot failure if pulled LOW<\/li><li><strong>GPIO2<\/strong>: pin is high on BOOT, boot failure if pulled LOW<\/li><li><strong>GPIO15<\/strong>: boot failure if pulled HIGH<\/li><li><strong>GPIO3<\/strong>: pin is high at BOOT<\/li><li><strong>GPIO1<\/strong>: pin is high at BOOT, boot failure if pulled LOW<\/li><li><strong>GPIO10<\/strong>: pin is high at BOOT<\/li><li><strong>GPIO9<\/strong>: pin is high at BOOT<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Pins HIGH at Boot<\/h3>\n\n\n\n<p>There are certain pins that output a 3.3V signal when the ESP8266 boots. This may be problematic if you have relays or other peripherals connected to those GPIOs. The following GPIOs output a HIGH signal on boot: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>GPIO16<\/li><li>GPIO3<\/li><li>GPIO1<\/li><li>GPIO10<\/li><li>GPIO9<\/li><\/ul>\n\n\n\n<p>Additionally, the other GPIOs, except GPIO5 and GPIO4, can output a low-voltage signal at boot, which can be problematic if these are connected to transistors or relays. You can <a href=\"http:\/\/rabbithole.wwwdotorg.org\/2017\/03\/28\/esp8266-gpio.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">read this article<\/a> that investigates the state and behavior of each GPIO on boot.<\/p>\n\n\n\n<p class=\"rntbox rntclgreen\">GPIO4 and GPIO5 are the most safe to use GPIOs if you want to operate relays.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Analog Input<\/h3>\n\n\n\n<p>The ESP8266 only supports analog reading in one GPIO. That GPIO is called <strong>ADC0<\/strong> and it is usually marked on the silkscreen as<strong> A0<\/strong>.<\/p>\n\n\n\n<p>The maximum input voltage of the ADC0 pin is 0 to 1V if you&#8217;re using the ESP8266 bare chip. If you&#8217;re using a development board like the ESP8266 12-E NodeMCU kit, the voltage input range is 0 to 3.3V because these boards contain an internal voltage divider.<\/p>\n\n\n\n<p>You can learn how to use analog reading with the ESP8266 with the following guide: <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-adc-reading-analog-values-with-nodemcu\/\">ESP8266 ADC &#8211; Read Analog Values with Arduino IDE, MicroPython and Lua<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">On-board LED<\/h3>\n\n\n\n<p>Most of the ESP8266 development boards have a built-in LED. This LED is usually connected to GPIO2.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-on-board-LED.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU On-board LED\" class=\"wp-image-84975\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-on-board-LED.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-on-board-LED.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<p>The LED works with inverted logic. Send a HIGH signal to turn it off, and a LOW signal to turn it on.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">RST Pin<\/h3>\n\n\n\n<p>When the RST pin is pulled LOW, the ESP8266 resets. This is the same as pressing the on-board RESET button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-RESET-ENABLE-button.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU On-board Reset button\" class=\"wp-image-84976\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-RESET-ENABLE-button.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-RESET-ENABLE-button.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">GPIO0<\/h3>\n\n\n\n<p>When GPIO0 is pulled LOW, it sets the ESP8266 into bootloader mode. This is the same as pressing the on-board FLASH\/BOOT button.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"750\" height=\"421\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-FLASH-BOOT-button-1.jpg?resize=750%2C421&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"ESP8266 NodeMCU GPIO 0 Flash boot button\" class=\"wp-image-84979\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-FLASH-BOOT-button-1.jpg?w=750&amp;quality=100&amp;strip=all&amp;ssl=1 750w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-NodeMCU-kit-12-E-FLASH-BOOT-button-1.jpg?resize=300%2C168&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 750px) 100vw, 750px\" \/><\/figure><\/div>\n\n\n<h3 class=\"wp-block-heading\">GPIO16<\/h3>\n\n\n\n<p>GPIO16 can be used to wake up the ESP8266 from deep sleep. To wake up the ESP8266 from deep sleep, GPIO16 should be connected to the RST pin. Learn how to put the ESP8266 into deep sleep mode:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-deep-sleep-with-arduino-ide\/\">ESP8266 Deep Sleep with Arduino IDE<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/micropython-esp8266-deep-sleep-wake-up-sources\/\">ESP8266 Deep Sleep with MicroPython<\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">I2C<\/h3>\n\n\n\n<p>The ESP8266 doens\u2019t have hardware I2C pins, but it can be implemented in software. So you can use any GPIOs as I2C. Usually, the following GPIOs are used as I2C pins:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>GPIO5<\/strong>: SCL<\/li><li><strong>GPIO4<\/strong>: SDA<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">SPI<\/h3>\n\n\n\n<p>The pins used as SPI in the ESP8266 are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>GPIO12<\/strong>: MISO<\/li><li><strong>GPIO13<\/strong>: MOSI<\/li><li><strong>GPIO14<\/strong>: SCLK<\/li><li><strong>GPIO15<\/strong>: CS<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">PWM Pins<\/h3>\n\n\n\n<p>ESP8266 allows software PWM in all I\/O pins: GPIO0 to GPIO15. PWM signals on ESP8266 have 10-bit resolution. Learn how to use ESP8266 PWM pins:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-pwm-arduino-ide\/\">ESP8266 PWM with Arduino IDE<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp32-esp8266-pwm-micropython\/\">ESP8266 PWM with MicroPython <\/a><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Interrupt Pins<\/h3>\n\n\n\n<p>The ESP8266 supports interrupts in any GPIO, except GPIO16.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/interrupts-timers-esp8266-arduino-ide-nodemcu\/\">ESP8266 Interrupts and Timers with Arduino IDE<\/a><\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Wrapping Up<\/h2>\n\n\n\n<p>We hope you\u2019ve found this guide for the ESP8266 GPIOs useful. If you have some tips on how to use the ESP8266 GPIOs properly, you can write a comment below.<\/p>\n\n\n\n<p>We also have a <a href=\"https:\/\/randomnerdtutorials.com\/esp32-pinout-reference-gpios\/\">similar guide for the ESP32 GPIOs that you can read<\/a>.<\/p>\n\n\n\n<p>If you\u2019re getting started with the ESP8266, we have some great content you might be interested in:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/randomnerdtutorials.com\/home-automation-using-esp8266\/\"><strong>Home Automation using ESP8266 (course)<\/strong><\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-esp8266-wifi-transceiver-review\/\">Getting Started with the ESP8266<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/projects-esp8266\/\">30+ ESP8266 Projects and Tutorials<\/a><\/li><li><a href=\"https:\/\/randomnerdtutorials.com\/esp8266-web-server\/\">ESP8266 Web Server Tutorial<\/a><\/li><li><a href=\"https:\/\/makeradvisor.com\/esp32-vs-esp8266\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">ESP32 vs ESP8266 \u2013 Pros and Cons<\/a><\/li><\/ul>\n\n\n\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is a guide for the ESP8266 GPIOs: pinout diagrams, their functions and how to use them. The ESP8266 12-E chip comes with 17 GPIO pins. Not all GPIOs &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"ESP8266 Pinout Reference: Which GPIO pins should you use?\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/esp8266-pinout-reference-gpios\/#more-84815\" aria-label=\"Read more about ESP8266 Pinout Reference: Which GPIO pins should you use?\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":5,"featured_media":84977,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[265,300,264],"tags":[],"class_list":["post-84815","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-esp8266-project","category-0-esp8266","category-project"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2019\/05\/ESP8266-Pinout-GPIO-Pin-Reference-Guide.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/84815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=84815"}],"version-history":[{"count":3,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/84815\/revisions"}],"predecessor-version":[{"id":119159,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/84815\/revisions\/119159"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/84977"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=84815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=84815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=84815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}