標(biāo)題: STM32智能移動(dòng)加濕器程序與原理圖PCB 移動(dòng)端與測溫端 [打印本頁]

作者: liudayong    時(shí)間: 2021-5-28 21:52
標(biāo)題: STM32智能移動(dòng)加濕器程序與原理圖PCB 移動(dòng)端與測溫端
具體功能:尋黑線,當(dāng)檢測到其溫度值低于一個(gè)下限,停車開始啟動(dòng)加濕器。具體詳情都在壓縮包
Altium Designer畫的原理圖和PCB圖如下:(51hei附件中可下載工程文件)


STM32單片機(jī)移動(dòng)端源程序如下:
  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();        // 配置系統(tǒng)時(shí)鐘為72M
  21.   delay_init();    //延時(shí)初始化               
  22.         xunji_config();   //循跡初始化
  23.         TIM3_PWM_Init();        //電機(jī)pwm   TIM3
  24.         NVIC_Configuration();//設(shè)置NVIC中斷分組2:2位搶占優(yōu)先級(jí),2位響應(yīng)優(yōu)先級(jí)
  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.          
復(fù)制代碼

所有資料51hei提供下載:
智能移動(dòng)加濕器.7z (312.48 KB, 下載次數(shù): 59)







歡迎光臨 (http://www.torrancerestoration.com/bbs/) Powered by Discuz! X3.1