ESP8266 First Program Guide
Connect Your Board & Select It in the IDE
-
Plug your ESP8266 board into your computer using a USB cable.
-
In the Arduino IDE, go to Tools → Board → ESP8266 Boards and select your exact board (e.g. NodeMCU 1.0 (ESP-12E Module)).
-
Go to Tools → Port and select the port your board appears on:
- Windows:
COM3,COM4, etc. - macOS:
/dev/cu.usbserial-XXXXor/dev/cu.SLAB_USBtoUART - Linux:
/dev/ttyUSB0
- Windows:
-
Set Tools → Upload Speed to
115200if you run into upload errors.
If no port appears, double-check the USB cable (some are charge-only) and that the driver is installed correctly — see Hardware Setup.
Run a Test Sketch
- Open File → Examples → 01.Basics → Blink.
- Click Upload. Most NodeMCU and Wemos boards upload automatically without holding any buttons (unlike some ESP32 boards).
- The onboard LED should start blinking once your sketch runs (note: on many ESP8266 boards, the built-in LED is active LOW, so it blinks inverted).
Want a guided walkthrough with wiring and code explanations? Check out the LED Blink tutorial.
Troubleshooting
- "Failed to connect to ESP8266: Timed out waiting for packet header" — hold the FLASH/GPIO0 button on bare ESP-01 modules while uploading, or use a board with auto-reset circuitry like NodeMCU.
- Port doesn't show up — install the correct USB driver — see Hardware Setup — and try a different USB cable.
- Garbled text in Serial Monitor — make sure the monitor's baud rate matches your sketch's
Serial.begin()value (commonly115200).
What's Next?
- Browse ESP8266 tutorials & projects
- Try JustFlash to flash pre-built firmware directly from your browser — no IDE required
- Explore Basic Electronics fundamentals like resistors, LEDs, and breadboards

