标题: STM32智能移动加湿器程序与原理图PCB 移动端与测温端 [打印本页]

作者: liudayong    时间: 2021-5-28 21:52
标题: STM32智能移动加湿器程序与原理图PCB 移动端与测温端
具体功能:寻黑线,当检测到其温度值低于一个下限,停车开始启动加湿器。具体详情都在压缩包
Altium Designer画的原理图和PCB图如下:(51hei附件中可下载工程文件)


STM32单片机移动端源程序如下:
  1. #include "delay.h"
  2. #include "sys.h"
  3. #include "stm32f10x.h"
  4. #include "stm32f10x_usart.h"
  5. #include "GPIOIint.h"
  6. #include "key.h"
  7. #include "usart.h"
  8. #include "moter.h"
  9. #include "xunji.h"  
  10. #include "beep.h"
  11. #include "oled_iic.h"

  12. /////////////////////////////////////////
  13. //串口1波特率:115200
  14. //串口2波特率:9600
  15. //串口3波特率:9600
  16. //
  17. /////////////////////////////////////////

  18. int main(void)
  19. {

  20.          SystemInit();        // 配置系统时钟为72M
  21.   delay_init();    //延时初始化               
  22.         xunji_config();   //循迹初始化
  23.         TIM3_PWM_Init();        //电机pwm   TIM3
  24.         NVIC_Configuration();//设置NVIC中断分组2:2位抢占优先级,2位响应优先级
  25.         usart2init(9600);
  26.         OLED_Init();        
  27.   OLED_Clear();        
  28.          BEEP_Init();
  29.          BEEP=1;
  30.                  while(1)
  31.   {        
  32.                
  33.          if(data<60)
  34.          {
  35.                  XUNJI();
  36.                  if(data>=60)
  37.                  {
  38.                          while(1)
  39.                          {
  40.                                  
  41.                 CarBigLeft();
  42.                         BEEP=1;
  43.                 delay_ms(800);
  44.                  CarStop();
  45.                 delay_ms(800);
  46.                 while(1){
  47.          XUNJI();
  48.                 }        
  49.                  }
  50.          }
  51.                
  52. }

  53.   }

  54.      }
  55.          
复制代码

所有资料51hei提供下载:
智能移动加湿器.7z (312.48 KB, 下载次数: 59)







欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1