G01、Esp32 microPython安装 python VsCode 等工具包

安装python3.*

安装VsCode

安装cp2102驱动程序

在VSCode打开虚拟终端更新pip:

python -m pip install -i https://mirrors.aliyun.com/pypi/simple/ --upgrade pip --user

或者

python3 -m pip install -i https://mirrors.aliyun.com/pypi/simple/ --upgrade pip --user

安装:esptool工具,用于擦写esp32

python -m pip install -i https://mirrors.aliyun.com/pypi/simple/ esptool --user

下载:microPython 的Firmware  :

www.micropython.org

插入esp32 然后抹去里面的内容

win10

c:\users\linux\appdata\roaming\python\python38\site-packages\esptool.py --chip esp32 --port COM3 erase_flash

linux/macOS

首先进入您:esptool的安装目录

cd ~/Library/Python/3.8/lib/python/site-packages

擦除esp32

python3 esptool.py --port /dev/tty.SLAB_USBtoUART --chip esp32 erase_flash
写入 Firmware:
win10
c:\users\linux\appdata\roaming\python\python38\site-packages\esptool.py --chip esp32 --port COM3 write_flash -z 0x1000 C:\Users\linux\Downloads\esp32-idf4-20200120-v1.12-68-g3032ae115.bin
linux/macOS
python3 esptool.py --port  /dev/tty.SLAB_USBtoUART --chip esp32 write_flash 0x1000 /Users/macbook/downloads/esp32-idf4-20200215-v1.12-167-gf020eac6a.bin
安装 rshell
python -m pip install -i https://mirrors.aliyun.com/pypi/simple/ rshell --user
或者
python3 -m pip install -i https://mirrors.aliyun.com/pypi/simple/ rshell --user
连接ESP32
win10
 c:\users\linux\appdata\roaming\python\python38\site-packages\rshell\main.py -p COM3
linux/macOS
 python3 ./rshell/main.py -p /dev/tty.SLAB_USBtoUART

安装:

python -m pip install -i https://mirrors.aliyun.com/pypi/simple/ virtualenv --user

VsCode for Python:

 

按下快捷键Ctrl+Shift+X,进入插件管理页面

搜索:python

repl