ESP8266 (NodeMCU 1.0 - ESP-12E Module) Development Guide
Board Specifications
| Chipset | ESP8266EX (Tensilica L106, 32-bit, 80/160MHz) |
| Flash Memory | 4MB |
| SRAM | 160KB |
| WiFi | 802.11 b/g/n (2.4GHz) |
| USB-to-Serial | CH340G |
| Operating Voltage | 3.3V (logic level) |
| Input Voltage (Vin) | 5V via USB Type-C |
| GPIO Pins | 17 (including ADC0) |
| PWM, I2C, SPI, UART | Supported |
| Programming Interface | Type-C USB |
Environment Setup
1. Install Arduino IDE
Download the latest version from the Arduino official website.
2. Add ESP8266 Board Support
- Go to File → Preferences
- Add this URL to Additional Boards Manager URLs:
https://arduino.esp8266.com/stable/package_esp8266com_index.json
- Then go to Tools → Board → Boards Manager and search for "ESP8266".
- Click Install on esp8266 by ESP8266 Community.
3. Select Board & Port
- Board: NodeMCU 1.0 (ESP-12E Module)
- Flash Size: 4M (3M SPIFFS)
- Upload Speed: 115200
- CPU Frequency: 80 MHz (default)
- Port: The COM port detected when the board is connected.
IMPORTANT: If your computer cannot detect the ESP8266 board, first ensure you are using a proper USB data cable, not a charge-only cable. Many Type-C and Micro-USB cables only provide power but no data connection.
4. Install CH340 Driver (required)
- Download from WCH official site (Windows).
- macOS users can use the signed version available from sparkfun.com under "Documents → Driver".
5. Connect the Board
- Use a Type-C cable (depending on your board version).
- Confirm that the COM port appears in Tools → Port.
Upload Example Sketch
- Open File → Examples → ESP8266 → WiFi → WiFiScan
- Click Upload (right-arrow icon)
- Monitor upload logs in the Output Console:
Connecting........_____....._____.....
Writing at 0x00000000... (100%)
Hash of data verified.
Upload done.
Writing at 0x00000000... (100%)
Hash of data verified.
Upload done.
4. Once done, open Serial Monitor (Ctrl+Shift+M) → set baud rate to 115200 to see scanned WiFi networks.
Memory and Flash Information
| Section | Size | Description |
|---|---|---|
| Flash | 4MB | External SPI Flash |
| SRAM | 160KB | Runtime variables |
| Heap | ~50KB | Dynamic memory |
| SPIFFS | 3MB | File storage |
Use the following command (in Arduino Serial Monitor) to print memory info:
ESP.getFreeHeap();
Example: WiFi Connection
#include <ESP8266WiFi.h>
const char* ssid = "YourWiFiName";
const char* password = "YourWiFiPassword";
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println();
Serial.println("Connecting to WiFi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("WiFi connected!");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// Add your main code here
}
const char* ssid = "YourWiFiName";
const char* password = "YourWiFiPassword";
void setup() {
Serial.begin(115200);
delay(1000);
Serial.println();
Serial.println("Connecting to WiFi...");
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println();
Serial.println("WiFi connected!");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
}
void loop() {
// Add your main code here
}
Troubleshooting (Device Not Detected)
- Check Cable: Use a verified data cable.
- Try Different Port: Change to another USB port.
- Driver: Reinstall CH340 driver.
- Board Power: Ensure the board's blue LED turns on.
- Reset Board: Press and hold RST briefly.
If issues persist, try another computer or USB adapter.