Help using Pico and ENV IV SHT40 #14334
Replies: 3 comments 8 replies
-
EOI is usually a communication error and most of the time by missing pull-up resistors at the SDA and SCL lines. |
Beta Was this translation helpful? Give feedback.
-
A couple of weeks ago I got this sensor - ENV IV Unit with Temperature Humidity Air Pressure Sensor (SHT40+BMP280).
I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
I had the same problem than you (with a breakout board) and after reading the Sentiron documentation, i had the following line : time.sleep(0.01) at line 153 of the sht4x micropython driver from jposada202020 and it works very well (it is the recommended value by Sentiron) |
Beta Was this translation helpful? Give feedback.
-
Help please! I am a newbie to Micropython and the world of Pis and struggling to get this temperature sensor working for a project. Please help... kids are keen to get our home made incubator up and running and I have hit a wall.
The ENV IV sensor contains a SHT40 and a BMP280. I'd be happy if I could just get the SHT40 working. My wiring is straightforward, with male jumpers onto a simple breadboard to the Pico (no additional pull-up resistors).
I2C scan reports the expected device addresses for both the SHT40 and BMP280. But querying the SHT40 seems to make it fall over (line 10 is where it reads from sht.measurements).
Any suggestions for what to try please?
Code:
import time
from machine import Pin, I2C
from micropython_sht4x import sht4x
i2c = I2C(1, sda=Pin(2), scl=Pin(3)) # Correct I2C pins for RP2040
sht = sht4x.SHT4X(i2c)
print("i2c scan results: ", i2c.scan())
while True:
temperature, relative_humidity = sht.measurements
print(f"Temperature: {temperature:.2f}°C")
print(f"Relative Humidity: {relative_humidity:.2%}%")
print("")
time.sleep(0.5)
This code returns this when run:
i2c scan results: [68, 118]
Traceback (most recent call last):
File "", line 10, in
File "/lib/micropython_sht4x/sht4x.py", line 157, in measurements
OSError: [Errno 5] EIO
Beta Was this translation helpful? Give feedback.
All reactions