欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136
標題:
STM32瓦斯報警程序 mq2+bmp280+ds18b20+oled
[打印本頁]
作者:
輝輝輝輝
時間:
2021-6-15 19:16
標題:
STM32瓦斯報警程序 mq2+bmp280+ds18b20+oled
stm32驅動mq2和bmp280和ds18b20和oled的瓦斯報警系統
單片機源程序如下:
#include "bsp.h"
#include "stdio.h"
#include "stm32f10x.h"
#include "systick.h"
#include "LED.h"
#include "USART.h"
#include "DS18B20.h"
#include "oled.h"
#include "sys.h"
#include "adc.h"
#include "beep.h"
#include "myiic.h"
#include "bme280.h"
float Temp;
float bmp280_temp;
float bmp280_press;
float bmp280_humi;
float high;
int main(){
OLED_Init();
BEEP_Init();
Adc_Init();
delay_init();
USART1_Init();
LED_Init();
delay_ms(1000);
while(!Ds18b20_Init());
while(1){
// bme280GetData(&bmp280_press,&bmp280_temp,&bmp280_humi,&high);
LED_Turn();
Temp=Ds18b20ReadTemp();
// printf("temp:%2.4f\r\n",Temp*0.0625);
OLED_Num5(0,1,Get_Adc_Average(ADC_Channel_1,10));
OLED_Num5(0,0,Temp*0.0625);
delay_ms(1000);
}
}
復制代碼
所有代碼51hei下載,如有錯誤請大家多多指教:
UART+DS18B20.7z
(211.7 KB, 下載次數: 108)
2021-6-15 20:11 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
歡迎光臨 (http://www.raoushi.com/bbs/)
Powered by Discuz! X3.1