grove_temp_hum

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers grove_temp_hum.h Source File

grove_temp_hum.h

00001 
00002 
00003 
00004 #ifndef __GROVE_TEMP_HUM_H__
00005 #define __GROVE_TEMP_HUM_H__
00006 
00007 #include "suli2.h"
00008 
00009 // how many timing transitions we need to keep track of. 2 * number bits + extra
00010 #if defined(__MBED__)
00011 #define MAXTIMINGS 85
00012 #elif defined(ARDUINO)
00013 #define MAXTIMINGS 85
00014 #endif
00015 
00016 #define DHT11 11
00017 #define DHT22 22
00018 #define DHT21 21
00019 #define AM2301 21
00020 
00021 void grove_temp_hum_init(IO_T *io, int pin);
00022 bool grove_temp_hum_write_setup(IO_T *io, uint8_t type, uint8_t count);
00023 bool grove_temp_hum_readtemperature(IO_T *io, bool S, float *temperature);
00024 bool grove_temp_hum_readhumidity(IO_T *io, float *humidity);
00025 
00026 #endif