Files
2026-10-19 15:47:18 +08:00

17 lines
330 B
C

#ifndef __DHT11_H
#define __DHT11_H
/*
* DHT11 的数据线管脚 DATA --> PC10
*/
#include <stm32f10x_conf.h>
// 初始化 DHT11 控制器
void dht11_init(void);
// 获取 DHT11 传感器的 40位 数据,放入buf中
// 成功返回 1. 失败返回 0
int dht11_get_values(u8 buf[5]);
#endif // __DHT11_H