P5 图标替换
1.接着打开刚才的项目
![image-20240202215431720](https://img-blog.csdnimg.cn/img_convert/b3e8851559e8e9497a41fef5ed29590e.png)
2.运行到内置浏览器,观察效果
3.我们去阿里矢量图网站,进行查找图标
![image-20240202215603452](https://img-blog.csdnimg.cn/img_convert/65ca92979b020944d254aa7f27bddf7d.png)
4.搜索温度,挑选一个,然后调整一下颜色,Png下载,
![image-20240202215647752](https://img-blog.csdnimg.cn/img_convert/f02f79ff9827e561642222b5183d30d7.png)
5.湿度,也是一样,PNG下载
![image-20240202215800787](https://img-blog.csdnimg.cn/img_convert/64160e6fe81bc1cbe1f0a5c6ead37b0e.png)
6.再搜索一个,台灯
![image-20240202215850460](https://img-blog.csdnimg.cn/img_convert/511149c5f2efc55fda0fbeb4a7b7c14b.png)
7.把图片剪切到源目录的static目录,名字改成英文的,humi(湿度),lamp(台灯),temp(温度),
![image-20240202220020773](https://img-blog.csdnimg.cn/img_convert/190bce1097b8b45a612468063511f2e2.png)
![image-20240202220227755](https://img-blog.csdnimg.cn/img_convert/e376ac881f2b4660ec8b912e9446e130.png)
8.在源代码里面,进行路径替换
![image-20240202220323083](https://img-blog.csdnimg.cn/img_convert/075d825ac58c8085afb6614673985c6f.png)
![image-20240202220348335](https://img-blog.csdnimg.cn/img_convert/789a9a26c402fa49bc5a34f734d51a66.png)
![image-20240202220405359](https://img-blog.csdnimg.cn/img_convert/5e0555594491e73be3c5d26f0ca951ab.png)
9.保存后,就可以看到
![image-20240202220429015](https://img-blog.csdnimg.cn/img_convert/873759e8f9e1ebf8b66ac6f123ce4208.png)
10.台灯按钮的颜色,需要替换一下
![image-20240202220507300](https://img-blog.csdnimg.cn/img_convert/66a213b85c82c156aa3fb38e3ebdadb9.png)
11.标题也改一下,在static的pages.json里面改动
![image-20240202220704584](https://img-blog.csdnimg.cn/img_convert/6b7fe9bd343f6a786733aa6dd6647fd0.png)
12.随便起个名字就行
13.复制一个卡片, 我们就可以进行拓展了
![image-20240202220918437](https://img-blog.csdnimg.cn/img_convert/371f13a0ceeae16c1f76aede2bda90fd.png)
14.就可以看到空白的地方
![image-20240202220951937](https://img-blog.csdnimg.cn/img_convert/7087066e24f42bf22da4031d01c0a5ee.png)
![image-20240202221010442](https://img-blog.csdnimg.cn/img_convert/f2c7f6ef68d181370264704815c76c56.png)
15.里面放点东西,自由发挥
![image-20240202221044998](https://img-blog.csdnimg.cn/img_convert/9e8c3db57843aeda5c0230bde8778335.png)
16.链接硬件,下载最新的程序,我们就可以控制相关的灯开关
17.发现不同步,看下程序,需要把每三秒读取数据,进行解开注释
![image-20240202221846248](https://img-blog.csdnimg.cn/img_convert/88ed0561fbef60211edefbd1d1eeb509.png)