|
由于代碼過多這里就不展示分析了,想了解的可以看壓縮包
單片機(jī)源程序如下:
- #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();
-
-
-
- }
- }
復(fù)制代碼
所有資料51hei提供下載:
紅外.7z
(227.02 KB, 下載次數(shù): 51)
2020-12-5 16:06 上傳
點(diǎn)擊文件名下載附件
stm32驅(qū)動(dòng)MLX90614 下載積分: 黑幣 -5
|
評(píng)分
-
查看全部評(píng)分
|