ESP32-C3-MINI (SMD)

来自丢石头百科
Admin讨论 | 贡献2025年8月6日 (三) 10:33的版本 (创建页面,内容为“# 安装 ## 安装前准备 我们建议您使用您喜欢的IDE安装支持,但根据您的操作系统,还有其他选项可用。要安装Arduino-ESP32支…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
  1. 安装
    1. 安装前准备

我们建议您使用您喜欢的IDE安装支持,但根据您的操作系统,还有其他选项可用。要安装Arduino-ESP32支持,您可以使用以下选项之一。

注意

中国用户可能在使用GitHub时遇到连接和下载速度问题。请使用我们的Jihulab镜像作为仓库源: https://jihulab.com/esp-mirror/espressif/arduino-esp32.git

https://jihulab.com/esp-mirror/espressif/arduino-esp32.git
    1. 使用Arduino IDE安装

这是直接从Arduino IDE安装Arduino-ESP32的方法。

  • 稳定版链接:

https://espressif.github.io/arduino-esp32/package_esp32_index.json

  • 开发版链接:

https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

稳定版链接:

https://espressif.github.io/arduino-esp32/package_esp32_index.json

开发版链接:

https://espressif.github.io/arduino-esp32/package_esp32_dev_index.json

中国用户可能在使用上述链接时遇到连接和下载速度问题。请使用我们的Jihulab镜像:

  • 稳定版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json

  • 开发版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_dev_index_cn.json

稳定版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json

开发版链接:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_dev_index_cn.json

注意

从Arduino IDE版本1.6.4开始,Arduino允许使用开发板管理器安装第三方平台包。我们提供适用于Windows、macOS和Linux的软件包。

要使用开发板管理器开始安装过程,请按照以下步骤操作:

  • 安装1.8级或更高版本的当前上游Arduino IDE。当前版本位于[arduino.cc](https://www.arduino.cc/en/Main/Software)网站。
  • 启动Arduino并打开首选项窗口。
  • 在"附加开发板管理器URL"字段中输入上述发布链接之一。您可以添加多个URL,用逗号分隔。
  • 从工具 > 开发板菜单打开开发板管理器,安装esp32平台(安装后不要忘记从工具 > 开发板菜单中选择您的ESP32开发板)。

中国用户必须选择带有"-cn"后缀的软件包版本,并手动执行更新。此地区不支持自动更新,因为它们针对的是没有"-cn"后缀的默认软件包,这会导致下载失败。

  • 重启Arduino IDE。
    1. Windows(手动安装)

警告

Arduino ESP32核心v2.x.x不能在Windows 8.x x86(32位)、Windows 7或更早版本上使用。Windows 32位操作系统不再受此工具链支持。 Arduino ESP32 v1.0.6仍然可以在WIN32上工作。您可能需要安装python 3.8.x,因为它是Windows 7支持的最新版本。

在Windows上安装Arduino ESP32支持的步骤:

      1. 步骤1
  1. 从[arduino.cc](https://www.arduino.cc/en/Main/Software)下载并安装最新的Arduino IDE Windows安装程序
  2. 从[git-scm.com](https://git-scm.com/download/win)下载并安装Git
  3. 启动Git GUI并执行以下步骤:

从[arduino.cc](https://www.arduino.cc/en/Main/Software)下载并安装最新的Arduino IDE Windows安装程序

Windows Installer

从[git-scm.com](https://git-scm.com/download/win)下载并安装Git 启动Git GUI并执行以下步骤:

Git GUI
  • 选择克隆现有仓库
Clone Existing Repository
  • 选择源和目标
    • 草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。
    • 源位置:https://github.com/espressif/arduino-esp32.git
    • 目标目录:[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32
    • 点击克隆开始克隆仓库

草图本目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"草图本位置"下列出。

C:/Users/[YOUR_USER_NAME]/Documents/Arduino

源位置:https://github.com/espressif/arduino-esp32.git

https://github.com/espressif/arduino-esp32.git

目标目录:[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32

点击克隆开始克隆仓库

Clone
      1. 步骤2
      2. 步骤3
  • 打开指向[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32的Git Bash会话,执行`git submodule update --init --recursive`
  • 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe

打开指向[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32的Git Bash会话,执行`git submodule update --init --recursive`

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32
git submodule update --init --recursive

打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe

[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools
get.exe
      1. 步骤4
  • 当`get.exe`完成时,您应该在目录中看到以下文件
get.exe
      1. 步骤5
  1. 插入您的ESP32开发板并等待驱动程序安装(或手动安装可能需要的任何驱动程序)
  2. 启动Arduino IDE
  3. 在工具 > 开发板菜单中选择您的开发板
  4. 选择开发板连接的COM端口
  5. 编译并上传(上传时可能需要按住boot按钮)
    1. 如何更新到最新代码
  1. 启动Git GUI,您应该在"打开最近的仓库"下看到该仓库。点击它!
Git GUI
Open Recent Repository
  1. 从菜单Remote选择Fetch from > origin
Remote
Fetch from
origin
  1. 等待git拉取任何更改,然后关闭Git GUI
  2. 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe
Git GUI
[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools
get.exe
    1. Linux
      1. Debian/Ubuntu
sudo usermod -a -G dialout $USER && \
sudo apt-get install git && \
wget https://bootstrap.pypa.io/get-pip.py && \
sudo python3 get-pip.py && \
sudo pip3 install pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python3 get.py
  • 重启Arduino IDE。
  • 如果您已将Arduino安装到~/,请从mkdir -p ~/Arduino/hardware开始修改安装,如下所示:
cd ~/Arduino/hardware
mkdir -p espressif && \
cd espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python3 get.py
      1. Fedora

注意

命令$ sudo dnf -y install arduino很可能会安装旧版本。

$ sudo dnf -y install arduino
  • 打开终端并执行以下命令(复制 -> 粘贴并按回车):
sudo usermod -a -G dialout $USER && \
sudo dnf install git python3-pip python3-pyserial && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py
  • 重启Arduino IDE。
      1. openSUSE
sudo usermod -a -G dialout $USER && \
if [ `python --version 2>&1 | grep '2.7' | wc -l` = "1" ]; then \
sudo zypper install git python-pip python-pyserial; \
else \
sudo zypper install git python3-pip python3-pyserial; \
fi && \
mkdir -p ~/Arduino/hardware/espressif && \
cd ~/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py
  • 重启Arduino IDE。
    1. macOS
mkdir -p ~/Documents/Arduino/hardware/espressif && \
cd ~/Documents/Arduino/hardware/espressif && \
git clone https://github.com/espressif/arduino-esp32.git esp32 && \
cd esp32/tools && \
python get.py

其中~/Documents/Arduino代表您的草图本位置,如"Arduino" > "首选项" > "草图本位置"(在IDE启动后)中所示。相应地调整上述命令。

~/Documents/Arduino
  • 如果您收到以下错误,请通过xcode-select --install安装命令行开发工具,然后再次尝试上述命令:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • 运行命令:
xcode-select --install
  • 如果在运行python get.py时收到错误:IOError: [Errno socket error] [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590),请尝试使用python3代替python
  • 如果在运行python get.py时收到以下错误:urllib.error.URLError: <urlopen error SSL: CERTIFICATE_VERIFY_FAILED,请转到Macintosh HD > Applications > Python3.6文件夹(或任何其他python版本),并运行以下脚本:Install Certificates.command和Update Shell Profile.command
  • 重启Arduino IDE。