版本协议

Public Domain

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

创建时间:1年前

167 0

描述

<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;">注:* 为必填项</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;">请在报名阶段填写 ↓</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;"> </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;">* 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="color: #95a5a6; font-size: 14px;">温湿度检测仪的核心功能是测量环境中的温度和湿度。这种测量通常覆盖从-20℃到60℃,以及0%RH到100%RH的范围,并且当温度或湿度超过预设阈值时,设备会发出声音或闪光灯警报,提醒及时采取措施。适用于安装在医院,工厂等地进行监控环境。温湿度检测仪设计了多种安装方式,包括壁挂、吸盘、磁吸等,方便不同场景下的安装需求。</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;">*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: #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;"> </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;"> </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;">* 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: #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;"> </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> <ol style="line-height: 1.8;"> <li class="paragraph text-align-type-left pap-line-1.3 pap-line-rule-auto pap-spacing-before-3pt pap-spacing-after-3pt pap-hanging-indent-1.6em" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">拥抱开源,赋予项目无限价值。建议项目核心功能开源80%以上;</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 pap-hanging-indent-1.6em" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">2、若某一部分功能不可替代且删掉之后项目无法解决对应的问题,则这一部分实现的功能就是项目的核心功能;比如设计了一台电子负载且设计了一款上位机软件监控功率变化,则电子负载为核心功能,上位机软件为辅助功能;比如电子负载中使用了一款隔离485模块与上位机通信,则此485模块实现的通讯功能为辅助功能; </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 pap-hanging-indent-1.6em" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">项目应选择适合自己的<span style="text-decoration: underline;"><a href="/posts/98fdb2accd754af7b51990790db3b47a" target="_blank">开源协议</a></span>,若项目引用其他开源项目,应注明来源并遵循原作者的开源协议规定;原创项目推荐使用GPL3.0开源协议;</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 pap-hanging-indent-1.6em" style="line-height: 1.8;"><span style="color: #95a5a6; font-size: 14px;">直接引用开源项目的原电路或原代码实现的功能不可作为自己项目的核心功能、使用市场上通用模块直接实现的功能不可作为自己项目的核心功能。</span></li> </ol> <p 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;"><strong><span style="color: #0093e6;">请在竞赛阶段填写 ↓</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;">开源</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;">*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;"> </p> <p><img style="max-width: 100%;" src="//image.lceda.cn/oshwhub/a2f71f3093884106bffe02d80df29c86.png"></p> <p><img style="max-width: 100%;" src="//image.lceda.cn/oshwhub/e0240520b72c467bbfdc2b37e78e4e40.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="color: #95a5a6; font-size: 14px;"> 注:请前往<span style="text-decoration: underline;"><a href="https://lceda.cn/editor" target="_blank">嘉立创EDA</a> </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 pap-left-indent-1.6em" 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;">*5、软件部分</h3> <hr class="horizontal-splitline normal-bold-2"> <p>/* USER CODE BEGIN Header */<br>/**<br>  ******************************************************************************<br>  * @file           : main.c<br>  * @brief          : Main program body<br>  ******************************************************************************<br>  * @attention<br>  *<br>  * Copyright (c) 2024 STMicroelectronics.<br>  * All rights reserved.<br>  *<br>  * This software is licensed under terms that can be found in the LICENSE file<br>  * in the root directory of this software component.<br>  * If no LICENSE file comes with this software, it is provided AS-IS.<br>  *<br>  ******************************************************************************<br>  */<br>/* USER CODE END Header */<br>/* Includes ------------------------------------------------------------------*/<br>#include "main.h"<br>#include "adc.h"<br>#include "i2c.h"<br>#include "tim.h"<br>#include "gpio.h"</p> <p>/* Private includes ----------------------------------------------------------*/<br>/* USER CODE BEGIN Includes */</p> <p>/* USER CODE END Includes */</p> <p>/* Private typedef -----------------------------------------------------------*/<br>/* USER CODE BEGIN PTD */</p> <p>/* USER CODE END PTD */</p> <p>/* Private define ------------------------------------------------------------*/<br>/* USER CODE BEGIN PD */</p> <p>/* USER CODE END PD */</p> <p>/* Private macro -------------------------------------------------------------*/<br>/* USER CODE BEGIN PM */</p> <p>/* USER CODE END PM */</p> <p>/* Private variables ---------------------------------------------------------*/</p> <p>/* USER CODE BEGIN PV */</p> <p>/* USER CODE END PV */</p> <p>/* Private function prototypes -----------------------------------------------*/<br>void SystemClock_Config(void);<br>/* USER CODE BEGIN PFP */</p> <p>/* USER CODE END PFP */</p> <p>/* Private user code ---------------------------------------------------------*/<br>/* USER CODE BEGIN 0 */<br>struct DEVICE_PARAMTER device_paramter = {0};<br>/* USER CODE END 0 */</p> <p>/**<br>  * @brief  The application entry point.<br>  * @retval int<br>  */<br>int main(void)<br>{<br>  /* USER CODE BEGIN 1 */<br>    float temperature = 0;    <br>    float humidity = 0;<br>  /* USER CODE END 1 */</p> <p>  /* MCU Configuration--------------------------------------------------------*/</p> <p>  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */<br>  HAL_Init();</p> <p>  /* USER CODE BEGIN Init */</p> <p>  /* USER CODE END Init */</p> <p>  /* Configure the system clock */<br>  SystemClock_Config();</p> <p>  /* USER CODE BEGIN SysInit */<br>    HAL_DeInit();<br>  /* USER CODE END SysInit */</p> <p>  /* Initialize all configured peripherals */<br>  MX_GPIO_Init();    <br>  MX_ADC1_Init();<br>  MX_I2C1_Init();<br>  MX_TIM14_Init();<br>  /* USER CODE BEGIN 2 */<br>    HAL_Delay(100);<br>  SN74HC595_Send_Data(SN_DIG,0xFF);        //¹Ø±ÕÊýÂë¹ÜÏÔʾ<br>  SN74HC595_Send_Data(SN_LED1,0x00);<br>  SN74HC595_Send_Data(SN_LED2,0x00);<br>    <br>  /* USER CODE END 2 */<br>    HAL_SuspendTick();    //ÔÝÍ£µÎ´ð¶¨Ê±Æ÷£¬·Àֹͨ¹ýµÎ´ð¶¨Ê±Æ÷Öжϻ½ÐÑ<br>    HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); /* Ö´ÐÐWFIÖ¸Áî, ½øÈë˯Ãßģʽ */<br>  /* Infinite loop */<br>  /* USER CODE BEGIN WHILE */<br>  while (1)<br>  {<br>    /* USER CODE END WHILE */</p> <p>    /* USER CODE BEGIN 3 */<br>        if(device_paramter.KeyStatus == KEY_SHAKE_STATE)<br>        {<br>            HAL_Delay(10);<br>            if(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5) == GPIO_PIN_RESET)<br>            {<br>                while(HAL_GPIO_ReadPin(GPIOB,GPIO_PIN_5) == GPIO_PIN_RESET);<br>                <br>                SHT40_Read_RHData(&temperature,&humidity);    //¶ÁÈ¡ÎÂʪ¶È<br>                device_paramter.Temp = temperature * 10;        //·Å´óÎÂʪ¶È<br>                device_paramter.Humi = humidity * 10;<br>                HAL_TIM_Base_Start_IT(&htim14);                 //¿ªÊ¼¶¨Ê±Æ÷£¬ÏÔʾÁ½´ÎÊý¾Ý <br>                device_paramter.sleepStatus = 0;                        //Çå³ýÐÝÃß±êÖ¾<br>                device_paramter.KeyStatus = KEY_NO_PRESS;        //Çå³ý°´Ï±êÖ¾<br>            }<br>        }<br>        else if(device_paramter.sleepStatus == 1)                //ÏÔʾ½áÊø£¬½øÈëÐÝÃß<br>        {<br>            HAL_SuspendTick();    //ÔÝÍ£µÎ´ð¶¨Ê±Æ÷£¬·Àֹͨ¹ýµÎ´ð¶¨Ê±Æ÷Öжϻ½ÐÑ<br>            HAL_PWR_EnterSLEEPMode(PWR_MAINREGULATOR_ON, PWR_SLEEPENTRY_WFI); /* Ö´ÐÐWFIÖ¸Áî, ½øÈë˯Ãßģʽ */<br>        }<br>  }<br>  /* USER CODE END 3 */<br>}</p> <p>/**<br>  * @brief System Clock Configuration<br>  * @retval None<br>  */<br>void SystemClock_Config(void)<br>{<br>  RCC_OscInitTypeDef RCC_OscInitStruct = {0};<br>  RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};</p> <p>  /** Configure the main internal regulator output voltage<br>  */<br>  HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1);</p> <p>  /** Initializes the RCC Oscillators according to the specified parameters<br>  * in the RCC_OscInitTypeDef structure.<br>  */<br>  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;<br>  RCC_OscInitStruct.HSIState = RCC_HSI_ON;<br>  RCC_OscInitStruct.HSIDiv = RCC_HSI_DIV1;<br>  RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;<br>  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;<br>  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;<br>  RCC_OscInitStruct.PLL.PLLM = RCC_PLLM_DIV1;<br>  RCC_OscInitStruct.PLL.PLLN = 8;<br>  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;<br>  RCC_OscInitStruct.PLL.PLLR = RCC_PLLR_DIV2;<br>  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)<br>  {<br>    Error_Handler();<br>  }</p> <p>  /** Initializes the CPU, AHB and APB buses clocks<br>  */<br>  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK<br>                              |RCC_CLOCKTYPE_PCLK1;<br>  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;<br>  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;<br>  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;</p> <p>  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_2) != HAL_OK)<br>  {<br>    Error_Handler();<br>  }<br>}</p> <p>/* USER CODE BEGIN 4 */</p> <p>/* USER CODE END 4 */</p> <p>/**<br>  * @brief  This function is executed in case of error occurrence.<br>  * @retval None<br>  */<br>void Error_Handler(void)<br>{<br>  /* USER CODE BEGIN Error_Handler_Debug */<br>  /* User can add his own implementation to report the HAL error return state */<br>  __disable_irq();<br>  while (1)<br>  {<br>  }<br>  /* USER CODE END Error_Handler_Debug */<br>}</p> <p>#ifdef  USE_FULL_ASSERT<br>/**<br>  * @brief  Reports the name of the source file and the source line number<br>  *         where the assert_param error has occurred.<br>  * @param  file: pointer to the source file name<br>  * @param  line: assert_param error line source number<br>  * @retval None<br>  */<br>void assert_failed(uint8_t *file, uint32_t line)<br>{<br>  /* USER CODE BEGIN 6 */<br>  /* User can add his own implementation to report the file name and line number,<br>     ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */<br>  /* USER CODE END 6 */<br>}<br>#endif /* USE_FULL_ASSERT */</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 pap-left-indent-1.6em" 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;">*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;"><img src="//image.lceda.cn/oshwhub/4ffb7de564934f039c6b36a8d8d43ef5.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;"> </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;">注:项目涉及的BOM清单。在<span style="text-decoration: underline;"><a href="https://lceda.cn/editor" target="_blank">嘉立创EDA</a> </span>生成/上传设计文件后,BOM将自动生成至项目详情;建议包括型号、品牌、名称、封装、采购渠道、用途等内容。具体内容和形式应以表达清楚项目构成为准。 </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> <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;">*7、大赛LOGO验证</h3> <hr class="horizontal-splitline normal-bold-2"> <p style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/d3cb8f90a919469aab81a76888264526.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="color: #95a5a6; font-size: 14px;">请上传包含大赛logo的项目图片,logo以丝印形式印刷在PCB上面。</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: #95a5a6; font-size: 14px;">点击zip下载大赛logo标识! <span style="text-decoration: underline;"><a href="https://image.lceda.cn/easyedaResource/images/d1bbfd69f9404f56901a0e7b849b7245.rar" target="_blank">(大赛标识).zip</a></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;"> </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 style="line-height: 1.8;"><img src="//image.lceda.cn/oshwhub/d0e01aab342042c4a36e406ec1f1c609.jpg"></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;">视频要求:请横屏拍摄,分辨率不低于1280×720,格式Mp4/Mov,单个视频大小限100M内;</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: #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;"> </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">前往查看更多详情 ></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>

文档

BOM

暂无

附件

暂无

成员

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