Closed ACrazyConcept closed 3 years ago
I believe they both have the same default I2C address (0x44), so they can't be used on the same bus like that. It may be that the libraries are similar enough that there is no error, just erroneous results.
The SHT31 has a jumper to change the address, the SHT40 does not. Or you may be able to use different I2C busses for each, or an I2C multiplexor.
The SHT31 has a jumper to change the address, the SHT40 does not.
I wasn't aware of that option. But it appears to have solved the issue completely. Thanks!
I hooked up both a SHT31D and a SHT40 to the same RPi. But I kept getting these weird spikes in the SHT40 values if I also read the SH31D just before the SHT40, and worst of all if I read them both at the same time.
If I read the SHT40 before the SHT31D the values seem fine. But if I read the SHT40 too soon after the SHT31D it returns very high temperature and very low humidity.
I initially thought it was heat from the wires or some kind of interference. But now after having tried nearly all possible wiring alternatives, both with 3V and 5V, I think something might be happening due to the python code in some way.
Pasting two different tets. One where the SHT40 is read first and one where the SHT31D is read first.