18 #include <sys/timeb.h> 22 #define DHT11_GPIO_PIN 0 23 #define DHT11_PROTOCOL_TIMEOUT 100 24 #define DHT11_PROTOCOL_SIZE 800 25 #define DHT11_PROTOCOL_SIZE_MARGIN 200 27 #define DHT11_SUCCESS 0 28 #define DHT11_MISSING_INIT -1 29 #define DHT11_NO_MEAS_YET -2 30 #define DHT11_NO_VALID_MEAS_YET -3 31 #define DHT11_MEM_ALLOC_ERROR -4 32 #define DHT11_PROTOCOL_ERROR -5 33 #define DHT11_BAD_CHECKSUM -6 34 #define DHT11_BAD_TIME_STAMP -10 int dht11Measurement(void)
make a measurement and saves the data in an internal array returns DHT11_SUCCESS if successful DHT11_...
Definition: dht11.c:100
int dht11GetHumidity(void)
returns the measured humidity value in %
Definition: dht11.c:329
time_t dht11GetValidMeasTimeStamp(void)
returns the time stamp of the last valid measurement
Definition: dht11.c:364
int dht11GetRawData(int *)
returns the measured data independent of the checksum test
Definition: dht11.c:378
time_t dht11GetMeasTimeStamp(void)
returns the time stamp of the last measurement
Definition: dht11.c:350
int dht11GetValidRawData(int *)
returns the measured data which were checked by the checksum test
Definition: dht11.c:398
void dht11PrintError(int)
prints an error message in human understandable form
Definition: dht11.c:52
void dht11Init(void)
connects to the wiringPi library
Definition: dht11.c:86
int dht11GetChecksum(void)
returns the checksum as calculated from the data
Definition: dht11.c:412
void dht11SetDebug(bool)
switches debug mode on or off
Definition: dht11.c:45
int dht11GetValidTemperature(void)
returns the measured temperature value in degrees C
Definition: dht11.c:315
int dht11GetTemperature(void)
returns the measured temperature value in degrees C
Definition: dht11.c:304
int dht11GetValidHumidity(void)
returns the measured humidity value in %
Definition: dht11.c:340
int dht11GetDeviceChecksum()
returns the checksum as read from the dht11
Definition: dht11.c:426