16 explicit SHT10(
int data_pin_,
int clock_pin_)
17 : sht1x(data_pin_, clock_pin_, SHT1x::Voltage::DC_3_3v) {
21 temperature = sht1x.readTemperatureC();
22 if (isnan(temperature) || temperature < -30) {
23 temperature = TEMPERATURE_NOT_AVAILABLE;
29 humidity = sht1x.readHumidity();
30 if (isnan(humidity) || humidity < 0) {
31 humidity = HUMIDITY_NOT_AVAILABLE;
37 void iterateAlways() {
38 if (millis() - lastReadTime > 10000) {
39 lastReadTime = millis();
40 channel.setNewValue(getTemp(), getHumi());
45 channel.setNewValue(getTemp(), getHumi());
50 double temperature = TEMPERATURE_NOT_AVAILABLE;
51 double humidity = HUMIDITY_NOT_AVAILABLE;