harshkc03 / sht31-d_driver

Toit driver for the SHT31-D Digital Temperature & Humidity Sensor
MIT License
0 stars 1 forks source link

I2C_WRITE_FAILED #1

Open alexanderofyork opened 2 years ago

alexanderofyork commented 2 years ago

Help me out here. I'm new to toit & haven't gotten anything to work yet so maybe I've not set up VS Code correctly but in trying to run sht31_demo I got this output:

1970-01-01T00:00:23.356683Z: <device boot - reason: Reset after exiting deep sleep mode.> 1970-01-01T00:00:25.298246Z: INFO: connected to wifi (Focus Wireless) in 1 second 2022-06-30T20:39:01.421558Z: \ 2022-06-30T20:39:01.472837Z: \ EXCEPTION error. I2C_WRITEFAILED 0: Device.write.\ \/i2c.toit:135:18 1: Bus.write \/i2c.toit:89:25 2: Device.write \/i2c.toit:143:10 3: Device.write \/i2c.toit:135:5 4: Driver.write_command \/driver.toit:132:13 5: Driver.reset \/driver.toit:61:5 6: Driver.initialize \/driver.toit:40:5 7: Driver \/driver.toit:37:5 8: main /c:/Users/ralexander/OneDrive/Documents/VScode/.packages/github.com/harshkc03/sht31-d_driver/1.0.0/examples/sht31_demo.toit:16:20 9: __entry__.\ \/core/entry.toit:48:20

2022-06-30T20:39:01.490033Z: <process terminated - exit code: 1>

harshkc03 commented 2 years ago

Hi Robert! Your output says "I2C_WRITE_FAILED" which is a common error thrown due to wrong or loose connections. Maybe check your hardware once and run the demo again. I've just checked the demo code on my Adafruit SHT31 sensor and the code seems to work fine.