匿名
未登录
登录
丢石头百科
搜索
查看“ESP32-C3-MINI (SMD)”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
ESP32-C3-MINI (SMD)
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
= 安装 = == 安装前准备 == 我们建议您使用您喜欢的IDE安装支持,但根据您的操作系统,还有其他选项可用。要安装Arduino-ESP32支持,您可以使用以下选项之一。 <div class="admonition note"> <p class="admonition-title">注意</p> <p>中国用户可能在使用GitHub时遇到连接和下载速度问题。请使用我们的Jihulab镜像作为仓库源: https://jihulab.com/esp-mirror/espressif/arduino-esp32.git</p> </div> <syntaxhighlight lang="text"> https://jihulab.com/esp-mirror/espressif/arduino-esp32.git </syntaxhighlight> == 使用Arduino IDE安装(推荐) == 这是直接从Arduino IDE安装Arduino-ESP32的方法。 <div class="admonition note"> <p class="admonition-title">注意</p> <p>有关SoC支持的概述,请查看[https://docs.espressif.com/projects/arduino-esp32/en/latest/getting_started.html 支持的SoC表格],您可以在其中找到特定芯片是处于稳定版还是开发版发布状态。</p> </div> * 稳定版链接: 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 <div class="admonition note"> <p class="admonition-title">注意</p> <p>从Arduino IDE版本1.6.4开始,Arduino允许使用开发板管理器安装第三方平台包。我们提供适用于Windows、macOS和Linux的软件包。</p> </div> 要使用开发板管理器开始安装过程,请按照以下步骤操作: * 安装1.8级或更高版本的当前上游Arduino IDE。当前版本位于[https://www.arduino.cc/en/Main/Software arduino.cc]网站。 * 启动Arduino并打开首选项窗口。 https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/install_guide_preferences.png * 在"附加开发板管理器URL"字段中输入上述发布链接之一。您可以添加多个URL,用逗号分隔。 https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/install_guide_boards_manager_url.png * 从工具 > 开发板菜单打开开发板管理器,安装esp32平台(安装后不要忘记从工具 > 开发板菜单中选择您的ESP32开发板)。 https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/install_guide_boards_manager_esp32.png 中国用户必须选择带有"-cn"后缀的软件包版本,并手动执行更新。此地区不支持自动更新,因为它们针对的是没有"-cn"后缀的默认软件包,这会导致下载失败。 * 重启Arduino IDE。 == Windows(手动安装)== <div class="admonition warning"> <p class="admonition-title">警告</p> <p>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支持的最新版本。</p> </div> 在Windows上安装Arduino ESP32支持的步骤: === 步骤1 === # 从[https://www.arduino.cc/en/Main/Software arduino.cc]下载并安装最新的Arduino IDE Windows安装程序 # 从[https://git-scm.com/download/win git-scm.com]下载并安装Git # 启动Git GUI并执行以下步骤: * 选择克隆现有仓库 Clone Existing Repository https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-1.png * 选择源和目标 ** Sketchbook目录:通常是C:/Users/[您的用户名]/Documents/Arduino,在Arduino首选项中的"Sketchbook Location"下列出。 ** 源位置:https://github.com/espressif/arduino-esp32.git ** 目标目录:[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32 ** 点击克隆Clone开始克隆仓库 === 步骤2 === https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-2.png === 步骤3 === https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-3.png * 打开指向[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` <syntaxhighlight lang="text"> cd [ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32 </syntaxhighlight> <syntaxhighlight lang="text"> git submodule update --init --recursive </syntaxhighlight> 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-4.png === 步骤4 === * 当`get.exe`完成时,您应该在目录中看到以下文件 https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-5.png === 步骤5 === # 插入您的ESP32开发板并等待驱动程序安装(或手动安装可能需要的任何驱动程序) # 启动Arduino IDE # 在工具 > 开发板菜单中选择您的开发板 # 选择开发板连接的COM端口 # 编译并上传(上传时可能需要按住boot按钮) https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/arduino-ide.png == 如何更新到最新代码 == # 启动Git GUI,您应该在"打开最近的仓库(Open Recent Repository)"下看到该仓库。点击它! https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-update-1.png # 从菜单Remote选择Fetch from > origin https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-update-2.png # 等待git拉取任何更改,然后关闭Git GUI # 打开[ARDUINO_SKETCHBOOK_DIR]/hardware/espressif/esp32/tools并双击get.exe https://docs.espressif.com/projects/arduino-esp32/en/latest/_images/win-gui-4.png == Linux == === Debian/Ubuntu === * 从[https://www.arduino.cc/en/Main/Software arduino.cc]安装最新的Arduino IDE。 * 打开终端并执行以下命令(复制 -> 粘贴并按回车): <syntaxhighlight lang="bash"> 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 </syntaxhighlight> * 重启Arduino IDE。 * 如果您已将Arduino安装到~/,请从mkdir -p ~/Arduino/hardware开始修改安装,如下所示: <syntaxhighlight lang="bash"> cd ~/Arduino/hardware mkdir -p espressif && \ cd espressif && \ git clone https://github.com/espressif/arduino-esp32.git esp32 && \ cd esp32/tools && \ python3 get.py </syntaxhighlight> === Fedora === * 从[https://www.arduino.cc/en/Main/Software arduino.cc]安装最新的Arduino IDE。 <div class="admonition note"> <p class="admonition-title">注意</p> <p>命令$ sudo dnf -y install arduino很可能会安装旧版本。</p> </div> <syntaxhighlight lang="bash"> $ sudo dnf -y install arduino </syntaxhighlight> * 打开终端并执行以下命令(复制 -> 粘贴并按回车): <syntaxhighlight lang="bash"> 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 </syntaxhighlight> * 重启Arduino IDE。 === openSUSE === * 从[https://www.arduino.cc/en/Main/Software arduino.cc]安装最新的Arduino IDE。 * 打开终端并执行以下命令(复制 -> 粘贴并按回车): <syntaxhighlight lang="bash"> 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 </syntaxhighlight> * 重启Arduino IDE。 == macOS == * 从[https://www.arduino.cc/en/Main/Software arduino.cc]安装最新的Arduino IDE。 * 打开终端并执行以下命令(复制 -> 粘贴并按回车): <syntaxhighlight lang="bash"> 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 </syntaxhighlight> 其中~/Documents/Arduino代表您的Sketchbook目录,如"Arduino" > "首选项" > "Sketchbook Location"(在IDE启动后)中所示。相应地调整上述命令。 <syntaxhighlight lang="text"> ~/Documents/Arduino </syntaxhighlight> * 如果您收到以下错误,请通过xcode-select --install安装命令行开发工具,然后再次尝试上述命令: <syntaxhighlight lang="text"> xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun </syntaxhighlight> * 运行命令: <syntaxhighlight lang="text"> xcode-select --install </syntaxhighlight> * 如果在运行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。 = 使用 = == 开启烧录模式 == * 按住板上的BOOT按键(USB接口朝上方,左边的按键为BOOT按键,右边的按键为RST复位按键) * 插入USB线 * 稍等片刻,松开BOOT按键 == 选择正确的开发板 == 请在菜单Arduino IDE -> Tools -> Board -> esp32中,选择ESP32-C3 Dev Module [[File:ESP32-C3 Board Select.png|1400px]] == 打开USB的CDC模式 == ESP32-C3-MINI 需要使能USB的CDC模式,才能正常下载和打印LOG,请在Arduino IDE的菜单 [[File:ESP32-C3 CDC Mode Enable.png|1200px]] == 指定正确的端口 == 请在菜单Arduino IDE -> Tools -> Port中,选择系统探测到的开发板对应的端口 == 获得开发板信息 == 请在菜单Arduino IDE -> Tools 中,点击Get Board Info获得开发板的信息,如果端口选择正确,此时应该可以输出开发板的信息 == GPIO 测试 == 官方参考: https://docs.espressif.com/projects/arduino-esp32/en/latest/api/gpio.html 遍历所有GPIO输出方波:ESP32C3_GPIO_TEST.INO ,使用示波器就可以看到各个GPIO的输出方波 [[:File:ESP32C3_GPIO_TEST.ino.zip | 示例程序]] == WiFi与幻彩LED控制测试 == 编写ESP32S3 连接WiFi, 并根据状况使用GPIO8控制幻彩LED * 修改SSID 成自己的WiFi名称 * 修改密码成对应SSID的密码 * 编译下载 * 打开串口监视器,复位开发板(按一下RST按键)就可以看到连接状态 [[:File:DSTE3C3M-S_ESP32C3_WIFIconnection.ino.zip | 示例程序]]
返回至
ESP32-C3-MINI (SMD)
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志