23 #define PULSE_LONG delayMicroseconds(30)
24 #define PULSE_SHORT delayMicroseconds(15)
27 const uint8_t TEMP = 0;
28 const uint8_t HUMI = 1;
31 const uint8_t LOW_RES = 0x01;
32 const uint8_t NORELOAD = 0x02;
33 const uint8_t HEAT_ON = 0x04;
34 const uint8_t BATT_LOW = 0x40;
37 const int8_t S_Err_TO = -4;
38 const int8_t S_Err_CRC = -3;
39 const int8_t S_Err_NoACK = -2;
40 const int8_t S_Err_Param = -1;
41 const int8_t S_Meas_Wait = 0;
42 const int8_t S_Temp_Req = 1;
43 const int8_t S_Temp_Wait = 2;
44 const int8_t S_Humi_Req = 3;
45 const int8_t S_Humi_Wait = 4;
46 const int8_t S_Calc_Run = 5;
47 const int8_t S_Meas_Rdy = 6;
67 int8_t getResult(uint8_t cmd);
68 int8_t meas(uint8_t cmd);
69 int8_t measRdy(uint8_t cmd);
70 int8_t putByte(uint8_t value);
71 uint8_t getByte(
bool ack);
72 uint8_t bitrev(uint8_t value);
73 void startTransmission(
void);
74 void stopTransmission(
void);
75 void resetConnection(
void);
76 void calcCRC(uint8_t value, uint8_t *crc);
79 Sensirion(uint8_t dataPin, uint8_t clockPin, uint8_t address = 0x00,
bool noholdmaster =
false);
81 int8_t measureSleep(
float *temp,
float *humi,uint8_t timeoutcounter=30);
82 int8_t measure(
float *temp = NULL,
float *humi = NULL,
float *dew = NULL,
float temp0 = 0,
float *humi0 = NULL);
83 int8_t writeSR(uint8_t value);
84 int8_t readSR(uint8_t *result);
86 float calcTemp(uint16_t rawData);
87 float calcHumi(uint16_t rawData,
float temp);
88 float calcHumi(
float dewpoint,
float temp);
89 float calcDewpoint(
float humi,
float temp);
Definition: Sensirion.h:51