You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.
I'm using this library on ESP8266 processors. It was previously working properly, but it is now reporting temperature and humidity at 255. I've verified the sensor works using an Arduino Nano, and the same demo example. The only difference between the two is the pins used (I'm using D4 and D5 for SDA and SCL on a Wemos D1 mini).
Here's what I've changed in the example: (myHTU21D.begin(D4,D5) != true)
The text was updated successfully, but these errors were encountered:
Hi,
jptrsn you got 255 value because of collisions on I2C bus. If master can't get the value from sensor it throws the code 255. Don't use D6 for I2C. D6 is for SPI bus. Default I2C pins are D2 & D1. Also arduino esp8266 I2C driver is very glitchy. Try my - https://github.com/enjoyneering/ESP8266-I2C-Driver
It works better with none standard I2C pins.
bfaliszek, hardcoded variables is bad practice. Plus you are breaking compatibility - official/default I2C pins are D2 & D1.
I'm using this library on ESP8266 processors. It was previously working properly, but it is now reporting temperature and humidity at 255. I've verified the sensor works using an Arduino Nano, and the same demo example. The only difference between the two is the pins used (I'm using D4 and D5 for SDA and SCL on a Wemos D1 mini).
Here's what I've changed in the example:
(myHTU21D.begin(D4,D5) != true)
The text was updated successfully, but these errors were encountered: