LilyGO T-Watch学习(一)环境搭建,编译下载

1、安装arduino IDE,

安装后按照说明添加lib

IDE上选择“项目->加载库->添加.ZIP库”,选择C:\Users\用户名\Documents\Arduino\libraries\下的TTGO_TWatch_Library-master.zip;

查看是否添加成功:

项目->加载库,滑到最后可看见已添加的TTGO...

参考:https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library

2、安装esp32 arduino环境

参考:https://t-watch.readthedocs.io/zh_CN/latest/basics/index.html#id3

切到hardware目录下,新建目录espressif目录,右键选git bash here打开git bash,clone远程仓库

mkdir espressif
git clone --recursive https://github.com/espressif/arduino-esp32.git esp32

3、安装编译工具链

上一步下载后,出现esp目录,进入arduino/hardware/espressif/esp32/tools,双击get.exe自动获取

如果编译工程报如下错误:

atal error: freertos/FreeRTOS.h: No such file or directory

需要添加对应开发板,即T-WATCH,在“文件->首选项”里附加开发管理地址加上如下地址

https://dl.espressif.com/dl/package_esp32_index.json

然后在“工具->开发板->选择TTGO T-WATCH”

编译

参考:https://github.com/Xinyuan-LilyGO/TTGO_TWatch_Library/blob/master/docs/arduino-ide/boards_manager.md

4、关于下载

开机,插入包装盒子里自带的USB线,可识别到串口,然后arduino上选择“工具->端口”,选对应的串口,点“项目->上传"即可。

注意,最好用自带的,我用我买的一拖三数据线不识别串口。

猜你喜欢

转载自blog.csdn.net/hxl5955/article/details/112534086