版本协议

Public Domain

专业版
#第九届立创电赛#温湿度检测计

创建时间:4个月前

70 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" /> <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;">作品的主控电路采用了STM32G030,搭配了传感器模块等多个模块,可实现测量环境的温度和湿度。</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>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;">&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;"><span style="color: #95a5a6; font-size: 14px;">原创,未获奖,未答辩</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> <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> <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;">&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;"><span style="color: #95a5a6; font-size: 14px;">public</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> <p>&nbsp;</p> <p 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;"><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" /> <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/f6dc990ccfdb43399bfa66d9a1503470.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;"><img src="//image.lceda.cn/oshwhub/990d9968362c424d8695d750325fca45.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 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>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;">&nbsp;</p> <div>#include "main.h"</div> <div>#include "gpio.h"</div> <div>&nbsp;</div> <div>void SystemClock_Config(void);</div> <div>&nbsp;</div> <div>int main(void)</div> <div>{</div> <div>//HAL&iquest;&acirc;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;</div> <div>&nbsp; HAL_Init();</div> <div>//&Iuml;&micro;&Iacute;&sup3;&Ecirc;&plusmn;&Ouml;&Oacute;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;</div> <div>&nbsp; SystemClock_Config();</div> <div>//GPIO&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;</div> <div>Init_GPIO();</div> <div>&nbsp; while (1)</div> <div>&nbsp; {</div> <div>&nbsp;</div> <div>&nbsp; }</div> <div>&nbsp;</div> <div>}</div> <div>&nbsp;</div> <div>/<strong></div> <div>&nbsp; <em> @brief System Clock Configuration</div> <div>&nbsp; </em> @retval None</div> <div>&nbsp; */</div> <div>void SystemClock_Config(void)</div> <div>{</div> <div>&nbsp; RCC_OscInitTypeDef RCC_OscInitStruct = {0}; //&frac34;&sect;&Otilde;&ntilde;&Ecirc;&plusmn;&Ouml;&Oacute;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&frac12;&aacute;&sup1;&sup1;&Igrave;&aring;</div> <div>&nbsp; RCC_ClkInitTypeDef RCC_ClkInitStruct = {0}; //&times;&Uuml;&Iuml;&szlig;&Ecirc;&plusmn;&Ouml;&Oacute;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&frac12;&aacute;&sup1;&sup1;&Igrave;&aring;</div> <div>&nbsp;</div> <div>&nbsp; //&Aring;&auml;&Ouml;&Atilde;&Ouml;&divide;&Auml;&Uacute;&sup2;&iquest;&Icirc;&Egrave;&Ntilde;&sup1;&AElig;&divide;&Ecirc;&auml;&sup3;&ouml;&micro;&ccedil;&Ntilde;&sup1;</div> <div>&nbsp; HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);</div> <div>&nbsp;</div> <div>//&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&Iacute;&acirc;&sup2;&iquest;&frac34;&sect;&Otilde;&ntilde;&cedil;&ugrave;&frac34;&Yacute;&Ouml;&cedil;&para;&uml;&micro;&Auml;&sup2;&Icirc;&Ecirc;&yacute;&pound;&not;&Ocirc;&Uacute;&frac34;&sect;&Otilde;&ntilde;&Ecirc;&plusmn;&Ouml;&Oacute;&sup3;&otilde;&Ecirc;&frac14;&raquo;&macr;&frac12;&aacute;&sup1;&sup1;&Igrave;&aring;&Eacute;&Iuml;</div> <div>&nbsp; RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; //&Ntilde;&iexcl;&Ocirc;&ntilde;HSI&Ecirc;&plusmn;&Ouml;&Oacute;-16Mhz</div> <div>&nbsp; RCC_OscInitStruct.HSIState = RCC_HSI_ON; //&iquest;&ordf;&AElig;&ocirc;HSI&Ecirc;&plusmn;&Ouml;&Oacute;</div> <div>&nbsp; RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1; //HSI&sup2;&raquo;&middot;&Ouml;&AElig;&micro;</div> <div>&nbsp; RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT; //HSI&ETH;&pound;&times;&frac14;&Ouml;&micro;</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON; //&iquest;&ordf;&AElig;&ocirc;PLL</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI; //PLL&Ocirc;&acute;&Agrave;&acute;&times;&Ocirc;HSI</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1; //PLL VCO&Ecirc;&auml;&Egrave;&euml;&Ecirc;&plusmn;&Ouml;&Oacute;&micro;&Auml;&middot;&Ouml;&AElig;&micro;&Ograve;&ograve;&times;&Oacute;</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLN = 8; //PLL VCO&Ecirc;&auml;&sup3;&ouml;&Ecirc;&plusmn;&Ouml;&Oacute;&micro;&Auml;&plusmn;&para;&AElig;&micro;&Ograve;&ograve;&times;&Oacute;&pound;&not;8&plusmn;&para;&AElig;&micro; 16*8 = 128Mhz</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2; //PLL2&middot;&Ouml;&AElig;&micro;&pound;&not;&Ecirc;&auml;&sup3;&ouml;&sup2;&raquo;&Auml;&Uuml;&sup3;&not;&sup1;&yacute;64M&pound;&not;</div> <div>&nbsp; RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2; //PLL&Ecirc;&auml;&sup3;&ouml;&cedil;&oslash;&Iuml;&micro;&Iacute;&sup3;&Ecirc;&plusmn;&Ouml;&Oacute;&times;&Uuml;&Iuml;&szlig;&pound;&not;&sup2;&raquo;&sup3;&not;&sup1;&yacute;64Mhz&pound;&raquo;</div> <div>&nbsp; if (HAL_RCC_OscConfig(&amp;RCC_OscInitStruct) != HAL_OK) //&micro;&Egrave;&acute;&yacute;&Aring;&auml;&Ouml;&Atilde;&Iacute;&ecirc;&sup3;&Eacute;</div> <div>&nbsp; {</div> <div>&nbsp; &nbsp; Error_Handler();</div> <div>&nbsp; }</div> <div>&nbsp;</div> <div>&nbsp; /</strong> Initializes the CPU, AHB and APB buses clocks</div> <div>&nbsp; */</div> <div>&nbsp; RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK</div> <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |RCC_CLOCKTYPE_PCLK1; //&times;&Uuml;&Iuml;&szlig;&Ecirc;&plusmn;&Ouml;&Oacute;&Agrave;&agrave;&ETH;&Iacute;&pound;&not;&Iuml;&micro;&Iacute;&sup3;&Ecirc;&plusmn;&Ouml;&Oacute;&pound;&not;AHB&iexcl;&cent;APB&Ecirc;&plusmn;&Ouml;&Oacute;</div> <div>&nbsp; RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK; //&Iuml;&micro;&Iacute;&sup3;&Ecirc;&plusmn;&Ouml;&Oacute;&Ouml;&plusmn;&frac12;&Oacute;&Agrave;&acute;&times;&Ocirc;PLL&Ecirc;&plusmn;&Ouml;&Oacute;</div> <div>&nbsp; RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1; //AHB&times;&Uuml;&Iuml;&szlig;&Ecirc;&plusmn;&Ouml;&Oacute;&sup2;&raquo;&middot;&Ouml;&AElig;&micro;</div> <div>&nbsp; RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1; //APB1&times;&Uuml;&Iuml;&szlig;&sup2;&raquo;&middot;&Ouml;&AElig;&micro;</div> <div>&nbsp;</div> <div>&nbsp; if (HAL_RCC_ClockConfig(&amp;RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK) //&micro;&Egrave;&acute;&yacute;&Aring;&auml;&Ouml;&Atilde;&Iacute;&ecirc;&sup3;&Eacute;</div> <div>&nbsp; {</div> <div>&nbsp; &nbsp; Error_Handler();</div> <div>&nbsp; }</div> <div>}</div> <div>&nbsp;</div> <div>/*<em></div> <div>&nbsp; </em> @brief&nbsp; This function is executed in case of error occurrence.</div> <div>&nbsp; <em> @retval None</div> <div>&nbsp; </em>/</div> <div>void Error_Handler(void)</div> <div>{</div> <div>&nbsp; /<em> USER CODE BEGIN Error_Handler_Debug </em>/</div> <div>&nbsp; /<em> User can add his own implementation to report the HAL error return state </em>/</div> <div>&nbsp; while(1)&nbsp;</div> <div>&nbsp; {</div> <div>&nbsp; }</div> <div>&nbsp; /<em> USER CODE END Error_Handler_Debug </em>/</div> <div>}</div> <div>&nbsp;</div> <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" /> <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><img style="max-width: 100%;" src="//image.lceda.cn/oshwhub/199694ea87d24f4591a1781455d6b0f5.png" alt="IMG_256" /></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> <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> <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/pullimage/L9BIQOorCci2ujcigNugU1xR7VYGuqdqXzvRoS5V.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;">&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> <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> <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 title="实物演示视频" href="<a href="https://share.weiyun.com/fX45aV7p%22>https://share.weiyun.com/fX45aV7p&lt;/a>&lt;/p" target="_blank">https://share.weiyun.com/fX45aV7p">https://share.weiyun.com/fX45aV7p&lt;/a>&lt;/p</a>> </div></p>

文档

BOM

暂无

附件

附件名 下载
Project.uvprojx

成员

评论(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