-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SHT21 I2C unable to read #464
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
Comments
I am having the same issue #462 with the ADXL345 sensor. Works well with ESP8266 but fails to initialize I2C with ESP32. |
I did solve it partially by using this library https://github.com/markbeee/SHT21/tree/master/examples/SHT21_Demo |
It's not timings, it's something with the slaves themselves. ESP32's I2C bus is way more complex than the one found in AVR arduinos, so something somewhere is going wrong ;) |
I have switched to SPI communication for time being and it is working okay. I am using just one slave (ADXL345) and still, it does not respond. |
Hmm, even if I have only 1 sensor, so it's not a slave? |
Are you using the SHT21 in the "hold master mode"? I'm not using the arduino core, but on my ESP32 I get a correct reading from the SHT21 if I'm using the "no-hold-master" mode. |
@kyjak @architmuchhal12 @stonie08 I have posted a fix for the I2C subsystem that may be at the root of your problems, See #839 . @stonie08 The ESP32's I2C subsytem enforces a bit TIMEOUT, at maximum it is around 12ms or 2^20 cpu clocks @ 80mhz. How long is the hold period during this conversion? If it is anywhere near 5ms the ESP32 will react badly. Chuck. |
Thanks, will try out
And let you know ;)
Kyjak
Get Outlook for Android<https://aka.ms/ghei36>
…________________________________
From: chuck todd <[email protected]>
Sent: Friday, November 17, 2017 12:41:22 AM
To: espressif/arduino-esp32
Cc: mito; Mention
Subject: Re: [espressif/arduino-esp32] SHT21 I2C unable to read (#464)
@kyjak<https://github.com/kyjak> @architmuchhal12<https://github.com/architmuchhal12> @stonie08<https://github.com/stonie08> I have posted a fix for the I2C subsystem that may be at the root of your problems, See #839<#839> .
@stonie08<https://github.com/stonie08> The ESP32's I2C subsytem enforces a bit TIMEOUT, at maximum it is around 12ms or 2^20 cpu clocks @ 80mhz. How long is the hold period during this conversion? If it is anywhere near 5ms the ESP32 will react badly.
Chuck.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#464 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AOmdqloMa4BybeT8B8hfOzJ0WSwtFV6Kks5s3MgigaJpZM4OESKr>.
|
Thank you stickbreaker, I installed you version of arduio-esp32 and I can read my SHT21, it was almost not working with espressif. |
@manymany-many your welcome. Chuck. |
The I2C core was changed to @stickbreaker code officially after 13dcfe5 (thanks @stickbreaker), Let's close issues with old code and if have problems with the new code, open new issues =) |
I'm trying to get to work the Sensirion SHT21 I2C sensor on ESP32 without luck.
Using pins 21,22 as wire interface.
I tried all libraries I could find for SHT2x.
On arduino uno the code works, ESP does not.
It reads wrong sensor data = bogus.
It might be connected to the hal i2c library of esp32.
Do not have oscilloscope to show log :(
The text was updated successfully, but these errors were encountered: