A bare minimal arudino lib for this sensor for low power applications based on official SHT libraries.
If you find this library usefull and want to support open software consider to donate.
The library is designed for low power applications that will poll the reading periodically. When the sensor is not reading it is keep asleep consuming less than 1 uA.
SHTC3 sensor(Wire);
void setup() {
Serial.begin(9600)
Wire.begin();
sensor.begin();
}
void loop() {
s.sample();
Serial.print(F("[SHTC3] T:"));
Serial.print(s.readTempC());
Serial.print(F(" Cº / H: "));
Serial.print(s.readHumidity());
Serial.println(F(" %"));
delay(2000);
}
- The sensor is _NOT 5V tolerant: If using 5V boards a 3.3V power source or 3.3V regulator need to be used. Most arduino boards have 3.3V power line that can be used to power the device. SCL & SDA require also logic level shifters are required as this pins are nor 5V tolerant.
- Pull-up resistors are typically needed on SCL & SDA lines. Resistor values will depend on frequency and bus configuration.
- Sensor supports up to 400kHz (fast I2C).
if ARDUINO_SHTC3_NOFLOAT is defined no float computation is done. Temperature and Humidity will return a 16bit integer. This optimization will reduce the code size more at expense of precision in the reading.
Library has been tested on a arduino pro mini 3.3V.
- 0.0.1 First version
- 0.0.2 Bug correction
- 0.0.3 Fix wake & reset delay bug.