33 lines
609 B
C
33 lines
609 B
C
/*
|
|
* SHT40.h
|
|
*
|
|
* Created on: Nov 15, 2021
|
|
* Author: angoosh
|
|
*/
|
|
|
|
#ifndef INC_SHT40_H_
|
|
#define INC_SHT40_H_
|
|
|
|
#include "stm32l0xx_hal.h"
|
|
|
|
#define STH40_ADDRESS 0x44 //pro STH40xx-B is address 0x45
|
|
|
|
typedef enum {
|
|
High_Precision = 0xFD,
|
|
Medium_Precision = 0xF6,
|
|
Low_Precision = 0xE0,
|
|
Heater_200mW_1s = 0x39,
|
|
Heater_200mW_100ms = 0x32,
|
|
Heater_110mW_1s = 0x39,
|
|
Heater_110mW_100ms = 0x32,
|
|
Heater_20mW_1s = 0x39,
|
|
Heater_20mW_100ms = 0x32,
|
|
Serial_Number = 0x89,
|
|
Soft_Reset = 0x94
|
|
} STH40_COMMANDS;
|
|
|
|
|
|
void STH40_Read_Sensor_Data(STH40_COMMANDS command, float *retVal);
|
|
|
|
#endif /* INC_SHT40_H_ */
|