标题: 自己写的STM32开发板MLX90614红外测温系统参考代码 [打印本页]

作者: 1922323908    时间: 2020-12-5 12:49
标题: 自己写的STM32开发板MLX90614红外测温系统参考代码
  由于代码过多这里就不展示分析了,想了解的可以看压缩包

单片机源程序如下:
  1. #include "stm32f10x.h"
  2. #include "./flash/bsp_spi_flash.h"
  3. #include "./lcd/bsp_ili9341_lcd.h"
  4. #include "./fonts/font.h"        
  5. #include "stdio.h"
  6. #include "math.h"
  7. #include "./MLX90614/mlx90614.h"


  8. uint16_t i=0;
  9. float  temperature=0;


  10. void Delay(uint32_t timp)
  11. {


  12.       for(;timp!=0;timp--);


  13. }


  14. void LCD_text(void)
  15. {        

  16.          char dispBuff[240];
  17.                LCD_SetFont(&Font8x16);
  18.                LCD_SetColors(RED,BLACK);                        
  19.                temperature=(float)SMBus_ReadTemp();                                                                                                                 
  20.                sprintf(dispBuff,"温度值: %f C",temperature);
  21.                      LCD_ClearLine(LINE(0));
  22.                ILI9341_DispStringLine_EN_CH(LINE(0),dispBuff);

  23. }




  24. int main(void)
  25. {
  26.         

  27.         SMBus_Init();
  28.   ILI9341_Init ();
  29.   while (1)
  30.   {   
  31.        ILI9341_Clear ( 0, 16, 240,305);         
  32.                    LCD_text();
  33.    
  34.                      
  35.    
  36.   }
  37. }
复制代码

所有资料51hei提供下载:
红外.7z (227.02 KB, 下载次数: 51)







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