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

SHT30Error: Bus error with Raspberry Pi Pico and Adafruit SHT-30 Mesh-protected Weatherproof temp/hum sensor #3

Open
Katoen58 opened this issue Dec 16, 2022 · 2 comments · May be fixed by #5

Comments

@Katoen58
Copy link

Hi Roberto and Matthew

I don't know if I'm correct making an issue on Github for this when running into the above problem. Otherwise tell me where to put it correctly.

I tried to get the Adafruit SHT-30 Mesh-protected Weather-proof Temperature/Humidity Sensor on a Raspberry Pi Pico (other platform than where you made this driver for, I'm aware of that fact) with micropython:
MicroPython v1.19.1-746-gf2de289ef on 2022-12-13; Raspberry Pi Pico W with RP2040.

In order to get the sensor recognised I had to make changes to the /lib/sht30/ht30.py file:
Line 9: DEFAULT_I2C_ADDRESS = 0x44 (instead of 45)
Lines 40 and 46: scl_pin=17, sda_pin=16 (instead of 4 and 5; SHT-30 connected to corresponding Pico hardware pins)
Line 41: self.i2c = I2C(0, scl=Pin(scl_pin), sda=Pin(sda_pin)) (I had to add '0, ' otherwise I got 'TypeError: 'id' argument required')

When I run your example-scripts:
###How to get the temperature and relative humidity (as did the Read and Reset examples):

%Run -c $EDITOR_CONTENT
Traceback (most recent call last):
File "", line 5, in
File "/lib/sht30/sht30.py", line 137, in measure
File "/lib/sht30/sht30.py", line 102, in send_cmd
SHT30Error: Bus error

###Check if shield is connected:

%Run -c $EDITOR_CONTENT
Is connected: True

An I2C-scan:

%Run -c $EDITOR_CONTENT
i2c devices found: 1
At address: 0x44

I even got these error-messages when putting 2.2 or 4.7 kOhm resistors between sda/scl and VCC. Also the Adafruit LTC4311 I2C active terminator didn't change a thing...
Running the SHT-30 on a Raspberry Pi 4 with yhe Adafruit CircuitPython makes it work fine.

I hope you can help.

Best regards,

Bart Elffers.

@vilisseranen
Copy link

Hello @Katoen58, in case you are still looking to run the SHT30 on a raspberry pi pico, I was successful using https://github.com/n1kdo/temperature-sht30/blob/master/src/temperature/sht30.py.

@Katoen58
Copy link
Author

Katoen58 commented Sep 2, 2023 via email

@ederjc ederjc linked a pull request Oct 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants