5v供电的STM8S103模拟I2C驱动DHT10和AHT10温湿度传感器程序代码,带IO模拟I2C和延时函数。已打板验证和使用。
2021-08-12 16:54:32 6KB DHT10 AHT10 STM8S103xx I2C
1
(针对STM32开发)DHT10的I2C驱动源代码,可以直接使用。 ---------------- uint32_t DHT10_Init(void); //初始化DHT10 static uint8_t DHT10_Read_Cal_Enable(void); //查询cal enable位有没有使能 static uint32_t DHT10_MeasureTrigger(void); //发送测量命令 uint32_t DHT10_GetTHValue(uint32_t *THValue); //读取湿度温度数据 uint32_t DHT10_RESET(void); //reset the device, need 20ms static uint32_t I2C_DHT10_ReadTHValue(uint32_t *THValue); //读取测量数据 static uint32_t I2C_DHT10_SendCommand(unsigned char *cmd, unsigned char NumByteofCmd); //发送DHT10命令
2019-12-21 20:24:54 3KB STM32 DHT10 I2C
1