lehuijie 发表于 2021-7-19 00:20

服药精灵药盒

<p style="text-align: center;"><strong><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">服药精灵药盒</span></span></span></span></strong></p>

<p style="text-align: right;"><span style="font-size:10.5pt"><span style="word-break:break-all"><span style="font-family:&quot;Times New Roman&quot;,serif"><b><span style="font-size:14.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">作者:lehuijie </span></span></b><b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </b></span></span></span></p>

<p>&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><strong><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">一、作品简介</span></span></strong><br />
<span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">简介:主要针对需要长期服药的老年人或者慢性病患者,对服药时间与量做一些提示,防止忘记。日常生活中,老人和一些需要长期服药的慢性病患者,经常会忘记服药,或者忘记是否服药,这样不利于身体健康。在手机APP端也有了类似备忘录的服药精力软件,但无硬件参与。本作品利用温度与湿度传感器判断了药品保存条件是否合理。采用定时器来做了一个到点提醒吃药。</span></span></span></span></p>

<p>&nbsp;
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">二、系统框图</span></span></span></span></strong><br />
<br />
&nbsp;</p>
</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">硬件部分比较简单,主要核心还在于RSL10,利用到其BLE定时器和ADC采集电池电压。通过IIC去获取BME60的温湿度数据,有闹钟或者告警时,则绿灯亮起。案件关闭闹钟和告警。</span></span></span></span></span></p>

<p>&nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">三、各部分功能说明</span></span></span></span></strong></p>

<p style="text-align:justify"> &nbsp;&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">作品有两个主要的告警功能:</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">1 </span></span></span><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">内部定时器比对设定的闹钟时间,时间达到则不断的发送BLE数据,来作为闹钟提醒该服药。</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">2 </span></span></span><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">根据设定特定药品需要存储的温湿度,调用温湿度传感器与设定的温度进行判断是否符合存储环境,不符合则BLE发送告警。</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">以上的告警和闹钟都会使红色LED亮起,只有按下按钮才能消除告警。</span></span></span></span></span></p>

<p><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">此外,还有通过内部ADC测量电池电压,通过BLE的电量服务传输,可以一目了然的看到药盒的当前电量。以上的数据皆可以通过BLE上送。</span></span></span></span></span></p>

<table class="Table" style="width:256px; margin-left:8px; border-collapse:collapse" width="256">
        <tbody>
                <tr>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:1px solid black; border-right:1px solid black; border-left:1px solid black" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">类型</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:1px solid black; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">时间</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:1px solid black; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">温度</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:1px solid black; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="left" style="text-align:left"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">湿度</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                </tr>
                <tr>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:none; border-right:1px solid black; border-left:1px solid black" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="right" style="text-align:right"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">1</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:none; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="right" style="text-align:right"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">6</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:none; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="right" style="text-align:right"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">1</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                        <td nowrap="nowrap" style="border-bottom:1px solid black; width:64px; padding:0cm 8px 0cm 8px; height:18px; border-top:none; border-right:1px solid black; border-left:none" valign="bottom"><br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                        <p align="right" style="text-align:right"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:等线"><span style="color:black">1</span></span></span></span></span></p>
                        <br />
                        &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</td>
                </tr>
        </tbody>
</table>

<p>&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="color:white"><span style="font-weight:normal">上</span></span></span></span><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">表则为时间对时BLE的数据帧。时间为6个字节。</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">第一个字节表示类型码,2,3,4位表示要设定闹钟组。0x00为常规类型,主要是查询药盒的当前时间和温湿度。0x10则为设定温湿度。</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">时间采用6字节,从第二字节开始依次为年月日,分秒时。闹钟设定只能时和分。</span></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="font-weight:normal">告警帧为4字节,第一字节为</span></span></span></span></span></p>

<p>&nbsp;
<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">四、作品源码</span></span></span></span></strong></p>
</p>

<p style="text-align:justify"><span style="font-size:16px;"><font face="微软雅黑, sans-serif">见附件</font></span></p>

<p>&nbsp;</p>

<p style="text-align:justify"><strong><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">五、作品功能演示视频</span></span></span></span></strong></p>

<p><a href="https://training.eeworld.com.cn/course/6121/learn?preview=1#lesson/30687">https://training.eeworld.com.cn/course/6121/learn?preview=1#lesson/30687</a></p>

<p>&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><b><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">六、项目总结</span></span></b></span></span></p>

<p style="text-indent:21.0pt; text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="font-size:12.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">零零散散搞了一些功能,作品的结构与APP端都没做,只完成了其中的提醒设定与提醒脑子。看了下论坛的其他的作品都完成的不错,深感惭愧。其实作品应该需要增加一个把提醒及时推送到APP的功能,后面如果能利用Beacon技术做一个出门提醒功能,提醒出门前记得吃药与带药。</span></span></span></span></p>

<p>&nbsp;</p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><b><span style="font-size:16.0pt"><span style="font-family:&quot;微软雅黑&quot;,sans-serif">七、其他</span></span></b></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:宋体"><a href="https://bbs.eeworld.com.cn/thread-1172731-1-1.html" style="color:#0563c1; text-decoration:underline">https://bbs.eeworld.com.cn/thread-1172731-1-1.html</a></span></span></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><a href="https://bbs.eeworld.com.cn/thread-1171197-1-1.html"><span lang="EN-US" style="font-size:11.0pt"><span style="font-family:宋体">https://bbs.eeworld.com.cn/thread-1171197-1-1.html</span></span></a><br />
<a href="https://bbs.eeworld.com.cn/thread-1166003-1-1.html"><span lang="EN-US" style="font-size:11.0pt"><span style="background:white"><span style="font-family:宋体"><span style="color:black">https://bbs.eeworld.com.cn/thread-1166003-1-1.html</span></span></span></span></a></span></span></p>

<p style="text-align:justify"><span style="font-size:10.5pt"><span style="font-family:&quot;Times New Roman&quot;,serif"><span style="background:white"><span style="font-family:&quot;微软雅黑&quot;,sans-serif"><span style="color:black">以上为论坛分享的链接。</span></span></span></span></span></p>

Jacktang 发表于 2021-7-19 14:07

<p>最后的项目总结,需要增加一个把提醒及时推送到APP的功能,是很必要,但不影响实用性</p>

miaods2002 发表于 2021-7-19 17:09

<p>好创意,赞一个!</p>

freebsder 发表于 2021-7-19 17:48

<p>可以可以,有點意思。加油樂樂!</p>

lehuijie 发表于 2021-7-21 16:58

Jacktang 发表于 2021-7-19 14:07
最后的项目总结,需要增加一个把提醒及时推送到APP的功能,是很必要,但不影响实用性

<p>及时推送对于服药时比较严格的很有帮助</p>
页: [1]
查看完整版本: 服药精灵药盒