专业版
#第九届立创电赛#【墨水屏】ESP8266温湿度检测仪/天气时钟

创建时间:2个月前

238 1

描述

<p><div class="document"> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">* 1、项目功能介绍</h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">最近想要一个能够看时间、室内温湿度、天气情况的电子产品,于是就有了这个项目。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">使用了ESP8266模块来作为主控,因为有物联网功能嘛,容易获取网络的信息,就是功耗高(有能力可自行更新低功耗功能)。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">然后用了一块中景园的2.9英寸墨水屏来作为显示屏幕(话说这墨水屏真贵啊&epsilon;(┬┬﹏┬┬)3)。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 24pt;"><strong>实物图:</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><img src="//image.lceda.cn/oshwhub/48c87bb4594e4c58a9ca989d448b4148.jpg" width="1214" height="683" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><img src="//image.lceda.cn/oshwhub/8e5cc253dd89464798b0713fa9f3e639.jpg" width="1213" height="682" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">目前主要功能有以下这些:</span></p> <ol> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; color: #e03e2d;">显示时间、天气情况、生活指数;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; color: #3598db;">检测室内温湿度然后显示;</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; color: #2dc26b;">检测电池电量。</span></li> </ol> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">后续可能更新的功能:<span style="color: #e67e23;">天气预报界面</span>。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">*2、更新与说明</h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 24pt;"><strong>更新:</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><strong>&nbsp; &nbsp;硬件版本:</strong></span></p> <ul> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">V1.1,调整面板按键图标的布局,修改模型高度以及边框沉底的高度,安装面板不会突出一部分。</span></li> </ul> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><strong>&nbsp; &nbsp;软件版本:</strong></span></p> <ul> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">V1.0,发布前进行部分优化,增加<span style="color: #000000;">低电量电池图标显示感叹号提示</span>。</span></li> </ul> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 24pt;"><strong>说明:</strong></span></p> <ul> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">不会更新深度睡眠功能,对本项目不实用。</span><span style="font-size: 18pt;">因为时间显示功能,需要在一分钟以内重启一次,复位重启会黑屏刷新,影响观感,有能力自行更新(已将GPIO16引脚接到RTS上)。</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">有3个按钮,其中一个是复位按钮,其他两个暂时没有写功能(也是温湿度的I2C两个引脚,可以进行复用,需要互锁)。后续用来切换天气预报界面。</span></li> </ul> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><em>3、开源协议</h3> <hr class="horizontal-splitline normal-bold-2" /><span style="color: #000000; font-size: 14pt;">GPL3.0开源协议</span> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"></em>4、硬件部分</h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 18pt;">此项目使用的是中景园的2.9英寸墨水屏,驱动电路参考的是官方手册,如果是微雪或者其他的墨水屏,可能需要修改部分电路(红框部分) 。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/370606a58e9b49839be5b60bb0dc06cf.png" alt="" width="800" height="501" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">硬件设计中,也将GPIO16(D0)引脚连接到了nRST引脚上,可以实现自动唤醒功能。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">不过这里有个坑,就有些ESP8266模块内部4MBflash的MISO引脚不上拉会导致自动唤醒卡死,坑了我好几天,我在原理图中已经画了MISO上拉电路。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">具体原因可以参考这篇:<a href="<a href="https://www.bilibili.com/read/cv30835214/?jump_opus=1%22>%E3%80%90%E5%85%B3%E4%BA%8E%E5%B8%82%E9%9D%A2%E4%B8%8A%E6%9F%90%E4%BA%9B8266%E6%A8%A1%E7%BB%84%E6%97%A0%E6%B3%95%E6%B7%B1%E5%BA%A6%E7%9D%A1%E7%9C%A0%E4%B8%8B%E5%94%A4%E9%86%92%E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95-%E5%93%94%E5%93%A9%E5%93%94%E5%93%A9%E3%80%91&lt;/a>&lt;/span>&lt;/p" target="_blank">https://www.bilibili.com/read/cv30835214/?jump_opus=1">【关于市面上某些8266模组无法深度睡眠下唤醒的解决办法-哔哩哔哩】&lt;/a>&lt;/span>&lt;/p</a>> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/cc419de645e7442392c087da6bb85a5c.png" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;">墨水屏引脚BS1之前设计成上拉了,现在已经修改过来,进行下拉处理。</span></p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">*5、软件部分</h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000;"><em><span style="font-size: 14pt;">软件部分,用的是Arduino IDE开发的(库封装程度真的高)。源码整理完(写一点点注释)之后会放到附件中,有修改部分库,所以需要进行替换。</span></em></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 24pt; color: #000000;"><strong>配网用的是WiFiManager库</strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; background-color: #ffffff; color: #000000;">用电脑或者手机打开WiFI界面,会有一个名叫ESP8266-AP的wifi,默认密码是12345678。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><strong><span style="color: #95a5a6;"><img src="//image.lceda.cn/oshwhub/3e3dab2b5ba24b008a85fa5b7d153705.png" width="479" height="283" /></span></strong></span><span style="font-size: 18pt;"><strong><span style="color: #95a5a6;"><img src="//image.lceda.cn/oshwhub/983a12f65a8c491ea5238f8bc0d777d2.png" width="342" height="285" /></span></strong></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; color: #000000;">连接ESP8266-AP之后,双击进入配网,点击Configue WiFi。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/f1468d1903b644d3bed017b983fe05ac.png" width="277" height="217" /><img src="//image.lceda.cn/oshwhub/a5f54aa6582b432694911d092f231eb5.png" width="294" height="222" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">输入要连接的WiFi名称和密码,点击save即可成功连接。具体步骤可参考<a href="<a href="https://www.bilibili.com/video/BV1L7411c7jw?p=21&amp;amp;vd_source=d1de49ac30a75975cdc3bbc0c321aa7d%22>%E5%A4%AA%E6%9E%81%E5%88%9B%E5%AE%A2%EF%BC%88%E7%94%A8WiFiManager%E5%BA%93%E9%85%8D%E7%BD%91%EF%BC%89&lt;/a>&lt;/span>&lt;/p" target="_blank">https://www.bilibili.com/video/BV1L7411c7jw?p=21&amp;amp;vd_source=d1de49ac30a75975cdc3bbc0c321aa7d">太极创客(用WiFiManager库配网)&lt;/a>&lt;/span>&lt;/p</a>> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 14pt;"><img src="//image.lceda.cn/oshwhub/3702799d54e44e7f92beb62f3f359f7e.png" width="260" height="295" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt;">获取密钥</span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">使用心知天气来获取天气情况,需要注册,然后将密钥填入。</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><img src="//image.lceda.cn/oshwhub/187ee03885b84d398b8a978fe02ea969.png" width="920" height="554" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;">烧录前配置</span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;">在arduino中打开首选项,在项目文件地址一栏找到库存放的路径</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/675fea1189434e91b9e9670ca570c76f.png" width="681" height="431" /></span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt; color: #000000;">在文件资源管理器中找到<span style="color: #e03e2d;">Arduino下的libraries</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/589e19e94bf64ff3af2fed4d808a54f9.png" width="850" height="233" /></span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 18pt;">将<span style="color: #e03e2d;">附件内的libraries文件</span>下的所有文件移入到Arduino的库中,有同名就进行替换</span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/22b310060ace4f48b2f8d7cbac1b263e.png" width="992" height="462" /></span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><span style="color: #000000;">打开程序,点开<span style="color: #e03e2d;">task.cpp</span>,将<span style="color: #e03e2d;">reqUserKey</span>替换成自己的心知天气密钥,<span style="color: #e03e2d;">reqLocation</span>是自己所在的城市,免费用户只能到市级,比如深圳市</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/1d450497d6fc4d06b17e6d922e4918e2.png" width="805" height="493" /></span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="font-size: 18pt;"><span style="color: #000000;">下载选择<span style="color: #e03e2d;">NodeMCU 1.0(ESP-12E Module)</span>,<span style="color: #e03e2d;">Flash Size</span>选择第一个</span></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;"><img src="//image.lceda.cn/oshwhub/225afe520efd4e7999f7acac15ff124a.png" /></span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><strong><span style="font-size: 24pt; color: #000000;">这样就配置好了,进行编译,无报错即可下载,支持<span style="color: #e03e2d;">OTA下载</span>(需要进行第一次烧录)</span></strong></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-left-indent-1.6em" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><em>6、BOM清单</h3> <hr class="horizontal-splitline normal-bold-2" /> <ul> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;">需要自己在淘宝购买中景园2.9英寸的墨水屏,其他元器件在立创商城都有,也可以去淘宝配置一些,比如ESP8266(ESP12F/E)。</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;">FPC连接器是24P上下翻盖式的,建议按照BOM在立创买。</span></li> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;">电池是603450,1200mAh,这是允许最大的尺寸,不能超过否则装不进去外壳。</span></li> </ul> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"><span style="color: #000000; font-size: 14pt;"><img src="//image.lceda.cn/oshwhub/2aeada4bbbe9456db971f5025c1d3431.png" width="425" height="426" /></span></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;"></em>7、大赛LOGO验证</h3> <hr class="horizontal-splitline normal-bold-2" /> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/d79ab91d30df4f648af15f8cc20af4ab.png" width="534" height="266" /></p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <h3 class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">* 8、成品视频演示</h3> <hr class="horizontal-splitline normal-bold-2" /> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> <p class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt" style="line-height: 1.8;">&nbsp;</p> </div></p>
  • 立创电赛:温湿度检测仪-成品展示.mp4

  • 立创电赛:温湿度检测仪-ESP8266模块(组装).mp4

文档

BOM

暂无

附件

附件名 下载
Hygrothermograph.zip
外壳3D打印 .zip
立创电赛:温湿度检测仪-成品展示.mp4
立创电赛:温湿度检测仪-ESP8266模块(组装).mp4

评论(2)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
szhl 回复
<p>请问一下电池型号是哪一款,有购买链接吗<br/>[emojis:呲牙]</p>
暮城唯一的雪 回复
<p>电池是603450的,这是允许的最大尺寸,再大后面就装不进去外壳了</p>
goToTop
svg-battery svg-battery-wifi svg-books svg-more svg-paste svg-pencil svg-plant svg-ruler svg-share svg-user svg-logo-cn svg-double-arrow