Skip to content

zhongnan00/ESP32_MCU_Demo

Repository files navigation

ESP32_MCU_Demo

ESP32 MUC developement

VSCode cache clean

rm -rf ~/.config/Code/Service\ Worker/*

ESP32 Command

1、安装各种必要的工具
sudo apt-get install git wget flex bison gperf python3-pip python3-venv cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0 net-tools

2、新建esp32目录
mkdir esp32
cd esp32

3、拉取gitee工具
git clone https://gitee.com/EspressifSystems/esp-gitee-tools.git

4、执行gitee工具切换镜像脚本
cd esp-gitee-tools
./jihu-mirror.sh set

5、拉取esp-idf源码
cd ..
git clone --recursive https://github.com/espressif/esp-idf.git

6、切换esp-idf版本分支到v5.2
cd esp-idf
git checkout v5.2
git submodule update --init --recursive
如果提示失败或有错误试下这句:../esp-gitee-tools/submodule-update.sh

7、更换pip源
pip config set global.index-url http://mirrors.aliyun.com/pypi/simple
pip config set global.trusted-host mirrors.aliyun.com

8、安装编译工具
../esp-gitee-tools/install.sh

9、设置环境变量并将环境变量放到.bashrc中
source export.sh
echo "source ~/esp32/esp-idf/export.sh" >> ~/.bashrc

10、下载课程配套源码
cd ~/esp32
git clone --recursive https://gitee.com/vi-iot/esp32-board.git

11、编译
cd esp32-board/helloworld
idf.py build

12、设置USB串口权限
sudo usermod -aG dialout usrname  usrname需要换成你的用户名

13、重启

ICP-line-cable

p1: I2C_SDA
p3: GND
p5: prensence_1
p7: prensence_2
P9: VCC5V

P2: I2C_SCL
P4: GND
P6: GND
P8: GND
P10: GND

stm32-lcd-board

VCC5V: red
GND: black
PA3: white, SCL
PA4: purple, SDA

ESP32-C6

vcc5v:
GND:
SDA: GPIO 3 ,purple
SCL: GPIO 2, blue

add dependency

cd project directory
idf.py add-dependency "espressif/esp_jpeg^1.0.5~2"


## then add the component directory and libs

cmd

 2007  git clone --recursive  https://github.com/espressif/esp-idf.git
 2008  ls
 2009  cd esp-idf/
 2010  ls
 2011  git submodule list
 2012  git submodule status
 2013  git branch
 2014  git fetch --all --tags
 2015  git branch
 2016  git tag
 2017  git checkout v5.1.2
 2018  git status
 2019  git branch
 2020  ls
 2021  history


 2035  idf.py create-component component
 2036  idf.py --list-targets 
 2037  idf.py set-target esp32s3
 2038  pwd
 2039  idf.py clean
 2040  idf.py fullclean 
 2041  history

About

ESP32 MUC developement

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published