ESP8266 Micropython 配置
板子型号:ESP-12E
0. 安装 windows 驱动:CP2102
- https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads
 - CP210x_Universal_Windows_Driver
 
1. 安装 esptool
1  | pip install esptool  | 
2. 刷入固件
- https://micropython.org/download/esp8266/
 - esp8266-20210618-v1.16.bin
 
1  | esptool --port COM3 erase_flash  | 
2. 刷入固件(Thonny)
安装 Thonny, scoop install thonny
Thonny 对 Micropython 的支持也挺好的,可以当作代码编辑器。
3. Led 测试
板载 LED 的编号是 2, 测试一下。
1  | from machine import Pin  | 
板载LED 亮灭的逻辑是反向的
GPIO2 为高电平时,LED 熄灭;GPIO2 低电平时,LED 亮起。注意:开机之后有的引脚是默认上电的!!!