Arduino IDE 完整安装 + ESP8266 配置教程

Arduino IDE 完整安装 + ESP8266 配置教程

第一步:下载安装 Arduino IDE

直接去官网下最新版(不要下旧版):
👉 官网下载https://www.arduino.cc/en/software
选择:Windows Win 10/11Installer 版本,一路下一步安装即可。


第二步:给 Arduino IDE 添加 ESP8266 支持

1. 打开 Arduino IDE → 点左上角 文件 → 首选项

2. 在 附加开发板管理器网址 里填入下面这行:

https://arduino.esp8266.com/stable/package_esp8266com_index.json

复制粘贴进去,点 确定


第三步:安装 ESP8266 开发板驱动

  1. 工具 → 开发板 → 开发板管理器
  2. 在搜索框输入:esp8266
  3. 找到 esp8266 by ESP8266 Community
  4. 安装(等待 1~3 分钟,不要关软件)

安装完成后,关闭管理器窗口。

image-20260504040254164


第四步:选择你的 ESP8266 板型(通用最稳)

工具 → 开发板 → ESP8266 Boards → 选择:Generic ESP8266 Module


第五步:配置正确参数

工具里按下面设置:

  • Flash Size:1MB (FS:64KB)4MB (FS:2MB)(大多数模块是 4MB)
  • Upload Speed:115200
  • CPU Frequency:80MHz
  • 端口:选择你 USB 转串口的端口(COMx)

第六步:测试编译 + 生成 bin 文件

  1. 随便打开一个示例:文件 → 示例 → ESP8266 → Blink
  2. 点左上角 编译,确保不报错,ctrI+s保存项目到桌面
  3. 项目 → 导出已编译的二进制文件
  4. 会在你的代码文件夹生成:
    Blink.ino.generic.bin
    
    这就是 bin 文件!

bin 文件烧录

需要安装 CH340 串口驱动(ESP8266 模块几乎都用这个)
👉 驱动下载:https://www.wch.cn/downloads/CH341SER_EXE.html

👉 所用软件:乐鑫(Espressif)官方的 ESP8266 固件烧录工具:ESP8266 DOWNLOAD TOOL V3.6.4

注意:烧录完成后重新上电,ESP8266-01s 板载LED闪烁

image-20260504041156116

示例程序如下:

/*
  ESP8266 Blink by Simon Peter
  Blink the blue LED on the ESP-01 module
  This example code is in the public domain

  The blue LED on the ESP-01 module is connected to GPIO1
  (which is also the TXD pin; so we cannot use Serial.print() at the same time)

  Note that this sketch uses LED_BUILTIN to find the pin with the internal LED
*/

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);  // Initialize the LED_BUILTIN pin as an output
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, LOW);  // Turn the LED on (Note that LOW is the voltage level
  // but actually the LED is on; this is because
  // it is active low on the ESP-01)
  delay(1000);                      // Wait for a second
  digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
}

posted @ 2026-05-04 04:14  Q&25  阅读(46)  评论(0)    收藏  举报