mutley
Posts: 61
Joined: Sat Jan 02, 2016 8:06 pm

i2c help - Adafruit SHT31-D Temperature & Humidity sensor

Fri Feb 26, 2016 3:39 pm

I've managed to get the i2c Adafruit SHT31-D temperature & humidity sensor working on the PI, but for some reason every time I turn the heater on, the next command passed over i2c fails and an alert is set on the sensor. Everything else seems to work ok, (reading temp & humidity, reading serial, clearing status & reset sensor). I'm sure there is probably something I've missed in the code, but I'm at a loss as to what. So I was wondering if anyone out there with this sensor could tell me if they have the heater working on the PI / post code / link as to how, maybe try my code. Or if any i2c guru could take a quick look at my code and SHT31-d spec sheet to see if there is something obvious I've missed.

Here is a link to the code (also references I used, inc spec sheet)
https://github.com/sfeakes/Adafruit-sht31-for-PI

It's using i2c-dev, and standard read and writes. I tried wiringpi but had no joy, also tried standard i2c_smbus_write & reads also no joy, that's why I ended up with standard read and writes.

Return to “Interfacing (DSI, CSI, I2C, etc.)”