20 #ifndef ADAFRUIT_SHTC3_H 21 #define ADAFRUIT_SHTC3_H 24 #include <Adafruit_I2CDevice.h> 25 #include <Adafruit_Sensor.h> 27 #define SHTC3_DEFAULT_ADDR 0x70 28 #define SHTC3_NORMAL_MEAS_TFIRST_STRETCH \ 30 #define SHTC3_LOWPOW_MEAS_TFIRST_STRETCH \ 32 #define SHTC3_NORMAL_MEAS_HFIRST_STRETCH \ 34 #define SHTC3_LOWPOW_MEAS_HFIRST_STRETCH \ 37 #define SHTC3_NORMAL_MEAS_TFIRST \ 39 #define SHTC3_LOWPOW_MEAS_TFIRST \ 41 #define SHTC3_NORMAL_MEAS_HFIRST \ 43 #define SHTC3_LOWPOW_MEAS_HFIRST \ 46 #define SHTC3_READID 0xEFC8 47 #define SHTC3_SOFTRESET 0x805D 48 #define SHTC3_SLEEP 0xB098 49 #define SHTC3_WAKEUP 0x3517 67 int _sensorID = 0x03C1;
86 int _sensorID = 0x0C30;
98 bool begin(TwoWire *theWire = &Wire);
99 uint16_t readID(
void);
101 void sleep(
bool sleepmode);
102 void lowPowerMode(
bool readmode);
104 bool getEvent(sensors_event_t *humidity, sensors_event_t *temp);
105 Adafruit_Sensor *getTemperatureSensor(
void);
106 Adafruit_Sensor *getHumiditySensor(
void);
115 Adafruit_I2CDevice *i2c_dev = NULL;
121 bool _lpMode =
false;
122 bool writeCommand(uint16_t cmd);
123 bool readCommand(uint16_t command, uint8_t *buffer, uint8_t num_bytes);
130 void fillTempEvent(sensors_event_t *temp, uint32_t timestamp);
131 void fillHumidityEvent(sensors_event_t *humidity, uint32_t timestamp);
bool getEvent(sensors_event_t *)
Gets the humidity as a standard sensor event.
Definition: Adafruit_SHTC3.cpp:244
void getSensor(sensor_t *)
Gets the sensor_t object describing the SHTC3's humidity sensor.
Definition: Adafruit_SHTC3.cpp:224
Adafruit_SHTC3_Humidity(Adafruit_SHTC3 *parent)
Create an Adafruit_Sensor compatible object for the humidity sensor.
Definition: Adafruit_SHTC3.h:62
Adafruit Unified Sensor interface for the temperature sensor component of SHTC3.
Definition: Adafruit_SHTC3.h:76
uint16_t _sensorid_humidity
ID number for humidity.
Definition: Adafruit_SHTC3.h:112
Adafruit Unified Sensor interface for the humidity sensor component of SHTC3.
Definition: Adafruit_SHTC3.h:58
Definition: Adafruit_SHTC3.h:93
float _temperature
Last reading's temperature (C)
Definition: Adafruit_SHTC3.h:109
uint16_t _sensorid_temp
ID number for temperature.
Definition: Adafruit_SHTC3.h:113
Adafruit_SHTC3_Temp(Adafruit_SHTC3 *parent)
Create an Adafruit_Sensor compatible object for the temp sensor.
Definition: Adafruit_SHTC3.h:80