版本协议

Public Domain

专业版
#第九届立创电赛#智能温湿度传感器

创建时间:1年前

247 0

描述

<p><div class="document"> <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;">注:<em> 为必填项</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="color: #0093e6;">请在报名阶段填写 &darr;</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;">&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> 1、项目功能介绍</h3> <hr class="horizontal-splitline normal-bold-2" /> <div class="lake-content"> <p id="u5e19d4c8" class="ne-p" style="margin: 0; padding: 0; min-height: 24px;"><span class="ne-text" style="font-size: 16px;">当有按键按下时,触发中断,此时结束睡眠模式,执行按键判断,获取温湿度并启动数码管进行显示;同时启动定时器中断,循环显示两次数据后再次进入睡眠,等待下次唤醒。</span></p> </div> <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>2、项目属性</h3> <hr class="horizontal-splitline normal-bold-2" />项目首次公开 <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" />Public Domain <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="color: #0093e6;">请在竞赛阶段填写 &darr;</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;">&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>4、硬件部分</h3> <hr class="horizontal-splitline normal-bold-2" /><img src="//image.lceda.cn/oshwhub/a87dd7ba3d624d45a799e8a7bef61fca.png" alt="" width="1631" height="785" /><br /> <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>/<em> 64Mhz时钟时,当ulCount为1,函数耗时3个时钟,延时=3</em>1/64us <em>/<br />__asm void SysCtlDelay(unsigned long ulCount)<br />{<br />&nbsp; &nbsp; SUBS r0,#1;<br />&nbsp; &nbsp; BNE SysCtlDelay;<br />&nbsp; &nbsp; BX lr;<br />}</p> <p>/</em><br />&nbsp; &nbsp; 函数内容:数码管显示数据函数<br />&nbsp; &nbsp; 函数参数:uint8_t row----行号<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uint8_t column-列号<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; uint8_t value--显示数据<br />&nbsp; &nbsp; 返回值:无<br />*/<br />void ShowNum(uint8_t row, uint8_t column, uint8_t value)<br />{<br />&nbsp; &nbsp; if(row == 1)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; switch(column)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 1: &nbsp; &nbsp;//如果是第一排第一个<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xFE);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED1,sgh_value[value]);//显示值对应16进制数<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 2:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xFD);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED1,(sgh_value[value]|0x80));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 3:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xFB);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED1,sgh_value[value]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; SysCtlDelay(1000); &nbsp; &nbsp;//大致延时50us<br />&nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED1,0x00); &nbsp; &nbsp;//消影,防止错位<br />&nbsp; &nbsp; }<br />&nbsp; &nbsp; else<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; switch(column)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 1:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xF7);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED2,sgh_value[value]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 2:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xEF);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED2,(sgh_value[value]|0x80));<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case 3:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_DIG,0xDF);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED2,sgh_value[value]);<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; default:<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; &nbsp; &nbsp; SysCtlDelay(1000); &nbsp; &nbsp;//大致延时50us<br />&nbsp; &nbsp; &nbsp; &nbsp; SN74HC595_Send_Data(SN_LED2,0x00);<br />&nbsp; &nbsp; }<br />}</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" /><img src="//image.lceda.cn/oshwhub/78b90e3ce8c54287a1c36ae085f48372.png" alt="" width="1428" height="420" /> <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" /><img src="//image.lceda.cn/oshwhub/592fc46bad9140b5965a43e6b36dea8c.png" alt="" width="544" height="200" /><br /> <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;"><a href="/posts/de460543d4cf4dacb5f0326612455578" target="_blank" rel="noopener"><a href="https://oshwhub.com/yg_test/sensor_temhum&lt;/a&gt;&lt;/p&gt" target="_blank">https://oshwhub.com/yg_test/sensor_temhum&lt;/a&gt;&lt;/p&gt</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;">&nbsp;</p> </div></p>

文档

BOM

暂无

附件

附件名 下载
立创电赛:《桌面温湿度检测仪》.mp4

评论(0)

  • 表情
    emoji
    小嘉工作篇
    小嘉日常篇
  • 图片
成功
工程所有者当前已关闭评论
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