You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
2 years ago | |
---|---|---|
.. | ||
.settings | 2 years ago | |
Core | 2 years ago | |
Debug | 2 years ago | |
Drivers | 2 years ago | |
.cproject | 2 years ago | |
.mxproject | 2 years ago | |
.project | 2 years ago | |
I2C_AHT20 Debug.launch | 2 years ago | |
I2C_AHT20.ioc | 2 years ago | |
Readme.md | 2 years ago | |
STM32F103C8TX_FLASH.ld | 2 years ago |
Readme.md
I2C_AHT20
-
将PB6、PB7分别配置为I2C_SCL、I2C_SDA
-
在Project Manager - Code Generator中勾选Generate peripheral initialization as a pair of...
-
配置I2C1
- I2C选择I2C
-
配置USART2为Asynchronous
-
复制dht20.c/dht20.h文件到Core的Src/Inc目录下
-
API
- DHT20_Init() 初始化AHT20
- DHT20_Get_T_H 获取温湿度
-
注意:默认无法使用sprintf打印浮点数,需要在工程Properties - C/C++ Build - Settings - MCU Settings中,勾选Use float with printf from newlib -nano