描述
<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;"><em> 1、项目功能介绍</h3>
<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;"> 这个温度计有点“贱贱”的,必须投币才给笑脸,给完笑脸看温度,然后在来段才艺表演。同时还是个无聊盒子,绝对不允许外人拨动开关,另外平时不小心碰了它还会生气。</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;"></em>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="color: #000000; font-size: 14px;">个人制作,首次公开,未获奖。</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;"><em> 3、开源协议</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: 14px;">GPL3.0</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;"></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: 14px;">温湿度计主控芯片:PY32f030E18M6TU</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="color: #000000; font-size: 14px;">温湿度传感器:<a class="brand-name" title="点击查看Sensirion(瑞士盛思锐)的品牌信息" href="<a href="https://list.szlcsc.com/brand/506.html" target="_blank">https://list.szlcsc.com/brand/506.html</a>" target="_blank" rel="noopener"><span class="hightLightText">Sensirion(瑞士盛思锐)</span></a>SHT40-AD1B。特别提醒一下,大家diy还是尽量使用嘉立创提供的焊好的sht40吧,这个传感器实在是太小了,我当时还想自己焊,结果外观看上去没问题,但数据始终读不出来,害得我折腾了半天,还以为程序有问题,最后换成了嘉立创焊好的元件,就没问题了。</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;">显示器:0.96oled</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;">另外还有两个舵机,一个SW-18010P和LM393组成的振动检测电路,一个拨钮开关,外壳为FREECAD设计并打印。</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/fd20d64430814d5c816feeabdddb140d.jpg" alt="" width="600" height="800" /></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>5、软件部分</h3>
<hr class="horizontal-splitline normal-bold-2" />
<p>程序主要分为以下几个部分:</p>
<p>硬件初始化:程序首先进行硬件初始化,包括系统时钟、外设、GPIO引脚以及IIC通信接口的配置。这是确保整个系统能够正常工作的前提。</p>
<p>IIC通信协议实现:由于温湿度传感器和OLED显示屏都采用IIC作为通信协议,程序中实现了软件模拟的IIC通信机制,以便与这些设备进行数据交换。</p>
<p>传感器数据读取:程序集成了SHT40温湿度传感器,通过IIC协议发送测量命令并读取温度和湿度数据。这些数据随后可以在OLED显示屏上展示给用户。</p>
<p>用户交互逻辑:程序设计了多种用户交互方式,包括振动开关、投币口和拨扭开关。每种交互方式都通过检测GPIO引脚的状态来触发,实现对设备的控制。这段时间有点忙,所以各种动作只设计了一套,以后有空了再加。</p>
<p>显示控制:OLED显示屏用于展示图像、文本和传感器数据。程序中包含了初始化OLED显示屏、显示图像和文本信息以及更新显示内容的函数。</p>
<p>动画效果实现:通过GIF函数,播放才艺表演。</p>
<p>舵电机控制:由定时器生成PWM信号控制电机的角度和速度,实现特定的动作。</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;">程序的IIC和oled程序都是移植的江科大的例程,但不知道为什么显示中文一直有问题,所以后来放弃中文了,直接图片+英文</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" />
<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;"> </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/ed710568234242a6b6afaaf5a75d648a.jpg" alt="" width="600" height="800" /><img src="//image.lceda.cn/oshwhub/2b6ee5d0ca674611878cebd9fe901145.jpg" alt="" width="600" height="800" /></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;"> </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> 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;"> </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;"> </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: 14px;"><a href="/posts/de460543d4cf4dacb5f0326612455578" target="_blank" rel="noreferrer noopener">前往查看更多详情 ></a></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;"> </p>
</div></p>
评论(0)