nodemcu

setup

Arduino IDE

  1. Install ESP8266 Board Support: Open your Arduino IDE, go to File>Preferences, In Additional Board Manager URLs, enter: http://arduino.esp8266.com/stable/package_esp8266com_index.json

    into the “Additional Board Manager URLs” field as shown in the figure below. Then, click the “OK” button

    Note: if you already have another boards (i.e ESP8266 boards URL), you can separate the URLs with a comma like this:

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json, http://arduino.esp8266.com/stable/package_esp8266com_index.json

  1. Install ESP8266 Boards: Tools > Board > Boards Manager

Search for ESP8266 and install the latest ESP8266 by Espressif Systems.

  1. Select Your Board:

Tools → Board. example: Select ESP8266 General module / nodemuc (matches your ESP8266).

  1. Open Blink Example:

Go to File → Examples → 01.Basics → Blink.

Click Upload (ensure the correct COM port is selected under Tools → Port).

lib

espnow

Getting Started with ESP-NOW (ESP8266 NodeMCU with Arduino IDE)

Troubleshooting

Fatal esptool.py error occurred: Write timeout

检查 device manager, 查看带感叹号的,比如 其他设备-> CP2102端口设备

安装 cp2102驱动即可