Initial import of STM32 IoT sensor node
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user