由于代码过多这里就不展示分析了,想了解的可以看压缩包
单片机源程序如下:
- #include "stm32f10x.h"
- #include "./flash/bsp_spi_flash.h"
- #include "./lcd/bsp_ili9341_lcd.h"
- #include "./fonts/font.h"
- #include "stdio.h"
- #include "math.h"
- #include "./MLX90614/mlx90614.h"
- uint16_t i=0;
- float temperature=0;
- void Delay(uint32_t timp)
- {
- for(;timp!=0;timp--);
- }
- void LCD_text(void)
- {
- char dispBuff[240];
- LCD_SetFont(&Font8x16);
- LCD_SetColors(RED,BLACK);
- temperature=(float)SMBus_ReadTemp();
- sprintf(dispBuff,"温度值: %f C",temperature);
- LCD_ClearLine(LINE(0));
- ILI9341_DispStringLine_EN_CH(LINE(0),dispBuff);
- }
- int main(void)
- {
-
- SMBus_Init();
- ILI9341_Init ();
- while (1)
- {
- ILI9341_Clear ( 0, 16, 240,305);
- LCD_text();
-
-
-
- }
- }
复制代码
所有资料51hei提供下载:
红外.7z
(227.02 KB, 下载次数: 50)
|