The ESP8266 NodeMCU, manufactured by Lolin, is a low-cost Wi-Fi microcontroller module with an integrated TCP/IP protocol stack. It is widely used for Internet of Things (IoT) applications due to its versatility and ease of use. The module features General Purpose Input/Output (GPIO), Pulse Width Modulation (PWM), Inter-Integrated Circuit (I2C), 1-Wire, and Analog-to-Digital Converter (ADC) capabilities, making it suitable for a wide range of projects.
Parameter | Value |
---|---|
Microcontroller | ESP8266 |
Operating Voltage | 3.3V |
Input Voltage | 7-12V |
Digital I/O Pins | 11 |
Analog Input Pins | 1 (10-bit ADC) |
Flash Memory | 4MB (32Mb) |
SRAM | 64KB |
Clock Speed | 80MHz (can be overclocked to 160MHz) |
Wi-Fi Standards | 802.11 b/g/n |
Wi-Fi Security | WPA/WPA2 |
Interfaces | UART, SPI, I2C, PWM, GPIO, ADC |
Dimensions | 58mm x 31mm x 13mm |
Pin | Name | Function |
---|---|---|
1 | GND | Ground |
2 | 3V3 | 3.3V Power Supply |
3 | EN | Chip Enable (Active High) |
4 | RST | Reset (Active Low) |
5 | VIN | External Power Supply (7-12V) |
6 | D0 | GPIO16 |
7 | D1 | GPIO5 (SCL) |
8 | D2 | GPIO4 (SDA) |
9 | D3 | GPIO0 |
10 | D4 | GPIO2 (TXD1) |
11 | D5 | GPIO14 (HSCLK) |
12 | D6 | GPIO12 (HMISO) |
13 | D7 | GPIO13 (HMOSI) |
14 | D8 | GPIO15 (HCS) |
15 | RX | GPIO3 (RXD0) |
16 | TX | GPIO1 (TXD0) |
17 | A0 | Analog Input (0-1V) |
Power Supply:
VIN
pin to a 7-12V power source or use the 3V3
pin for a 3.3V regulated supply.GND
pin to the ground of your circuit.Connecting to an Arduino UNO:
TX
pin of the ESP8266 to the RX
pin of the Arduino.RX
pin of the ESP8266 to the TX
pin of the Arduino.GND
pins of both devices are connected.Programming:
NodeMCU 1.0 (ESP-12E Module)
) from the Tools menu.Here is an example code to connect the ESP8266 NodeMCU to a Wi-Fi network and print the IP address:
#include <ESP8266WiFi.h>
// Replace with your network credentials
const char* ssid = "your_SSID";
const char* password = "your_PASSWORD";
void setup() {
Serial.begin(115200); // Initialize serial communication
delay(10);
// Connect to Wi-Fi network
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP()); // Print the IP address
}
void loop() {
// Put your main code here, to run repeatedly
}
ESP8266 Not Connecting to Wi-Fi:
Module Not Responding:
EN
pin is connected to 3V3
and the RST
pin is not grounded.Serial Communication Issues:
By following this documentation, users can effectively utilize the ESP8266 NodeMCU in their projects, whether they are beginners or experienced developers.