前言
DC UPS 这个项目来自于春节期间,现在第一版实现方案确定了,主控采用ESP32;
开发环境选择
在开发之前,博主在网络上了解过ESP32的开发环境有
- PlatformIO
- ESP-IDF
- Nodemcu
目前博主的理解:
ESP-IDF 相当于官方出的SDK
Nodemcu 相当于第三方的基于脚本的SDK
Arduino 也是相当于第三方的一个sdk
PlatformIO +VScode 相当于 开发环境,可以使用 ESP-IDF、Arduino 、Nodemcu
博主的选择
VScode + PlatformIO + arduino(因为它的库实在太丰富了)
vscode 安装
省略
PlatformIO 安装
省略、
问题记录
新建工程失败
Could not findthe package with 'platformio/tool-scons @~4.40300.0' requirements for your systemwindows_amd64'"
见下图
解决方案
把vscode 卸载,去官网下载最新版本,默认路径(无中文)安装。
电脑重启。
VSCODE 重新安装 PlatformIO。
测试
正常,可以编译,可以下载。