Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turn off the heater on the SHT40 #34

Closed
VladimirVecera opened this issue Feb 21, 2024 · 7 comments
Closed

Turn off the heater on the SHT40 #34

VladimirVecera opened this issue Feb 21, 2024 · 7 comments
Assignees
Labels

Comments

@VladimirVecera
Copy link

I use SHT40 and if I measure I get 30°C. If I use the Adafruit_SHT4x.h library, I measure 23°C. I think the heater is on because if I use SHT4X_LOW_HEATER_100MS on the Adafruint I get 30°C. If I turn it off sht4.setHeater(SHT4X_NO_HEATER); I get back 23°C.

@winkj
Copy link
Member

winkj commented Feb 21, 2024

The arduino-sht library has no heater support as of today; however, there was an issue in the past where the first reading was high (see issue #27).

And when you are seeing the high values, are they continuing to be too high, or is it just the first sample?

Also, which version of the library are you using? 1.2.4 is supposed to have a fix for this

@LeonieFierz
Copy link
Member

Please note that the driver specific to SHT4x https://github.com/Sensirion/arduino-i2c-sht4x supports to set the heater power.

@VladimirVecera
Copy link
Author

The problem arises if you leave the measurement in setup(). The reason is that I want to quickly measure and put the device to sleep. But during this measurement it was 30°C. If I LOOP() the measurement, I get a much lower temperature, 24°C, which is OK.

@winkj
Copy link
Member

winkj commented Feb 23, 2024

Which version of the library are you using?

@VladimirVecera
Copy link
Author

Latest.

@winkj
Copy link
Member

winkj commented Feb 23, 2024

Does the problem occur if you explicitly instantiate SHTSensor with an SHTSensor::SHT4X argument (see https://github.com/Sensirion/arduino-sht/blob/master/examples/multiple-sht-sensors/multiple-sht-sensors.ino#L11C16-L11C32 for an example)?

@winkj
Copy link
Member

winkj commented Feb 23, 2024

FYI: I just released v1.2.5, since it appears v1.2.4 was not picked up properly by the Arduino Library Manager. No code changes were made in this release

If you were previously using the Arduino arduino-sht installed via the Arduino Library Manager, this should fix your problem. It may take a few hours to be available via the Library Manager though. In the meantime, instantiating SHTSensor explicitly as outlined above should fix the issue.

@winkj winkj closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants