找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2232|回复: 0
收起左侧

STM32智能移动加湿器程序与原理图PCB 移动端与测温端

[复制链接]
ID:719754 发表于 2021-5-28 21:52 | 显示全部楼层 |阅读模式
具体功能:寻黑线,当检测到其温度值低于一个下限,停车开始启动加湿器。具体详情都在压缩包
Altium Designer画的原理图和PCB图如下:(51hei附件中可下载工程文件)
移动端.png 测温端.png 51hei.png 51hei.png

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.png
所有资料51hei提供下载:
智能移动加湿器.7z (312.48 KB, 下载次数: 57)

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表