-
Notifications
You must be signed in to change notification settings - Fork 7.6k
VEML6075 I2C sensor not working with ESP32 #1962
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
Release 1.0.0 does not work when ReSTART operations are used. This error has been fixed in this GitHub dev repo. When me-no-dev generates a new release the fix will be available through board manager. Until then, you can manually apply the fixes by substituting the four i2c files from this repo:
Chuck. |
thankyou. The sensor is working now! :). 👍 👍 🥇 |
@me-no-dev hey me - is there anything blocking a minor release fix that we can help with? I2c repeated-start sensors are pretty common these days :) |
The above four files are a huge improvement for I2C. There was no communication with an MPU6050 - there is now! It's still very temperamental. I'm using the Doit.com ESP32 Dev Kit V1, trying the standard SDA/SCL pins and alternates, I find the behavior similarly challenged. Sometimes after the sensor has been working for a couple of minutes, the values freeze. At this point the clock and data lines are no longer active on the scope - clock stays high and data is low. At other times, the new firmware recovery works and the sensor communication is restored. Other times, only a hardware reset works. Here is an example of a successful recovery: [D][esp32-hal-i2c.c:1300] i2cProcQueue(): Gross Timeout Dead start=0xc4d5, end=0xc508, =51, max=51 error=1 There are other instances where the "Recovered After" Cycle count is 9 cycles, but mostly the count is 1. The code sample is taken directly from the Arduino web site: `// MPU-6050 Short Example Sketch Wire.begin( 14, 27, 100000); |
Please don't hijack the thread. Open a different thread if you have issues with a different device. Please use appropriate markup for console text and code. This thread is resolved(AFAICT), just waiting for a release version. |
@midnightmaker open a new issue, describe your hardware, when SDA is stuck low, something is driving it. The reset function in ESP32 I2C will always make the ESP32 stop driving SDA, the MPU6050 is usually the culprit for holding SDA low. With your error being GROSS timeout, this means the MPU6050 didn't answer, try increasing the timeout If you want more help open a NEW issue. Chuck. |
Apologies - I was not looking for help or trying to hijack the thread. I was trying to advise that the behavior of the I2C port was still erratic in a general sense on the ESP32 when compared with other Arduino hardware. However, with the explanation from Chuck above, a change to the timeout does indeed correct the periodic firmware reset behavior. My concern that there was still a general ESP32 I2C problem was misplaced. Thanks for the helpful comment Chuck. |
hiya @igrr @me-no-dev checking back on this, i noticed no commits in the last 6 weeks - is this repo still going to be developed & supported? |
@ladyada sorry, was preoccupied with other things. Have not really been in one place. I see no reason to throw "is this repo still going to be developed & supported". I am looking for ways to get some help on the repo. Will update IDF and cut a release. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This stale issue has been automatically closed. Thank you for your contributions. |
Using an Adafruit Feather ESP32 wired up to an Adafruit VEML6075. A user of our library noticed this here and I verified it with a few different libaries/examples for this sensor.
adafruit/Adafruit_VEML6075#2
It's repeating start and VEML's have had an odd i2c stack so its not terribly surprising
Test code: https://github.com/adafruit/Adafruit_VEML6075
Hardware: https://www.adafruit.com/product/3964
BSP: v1.0.0 from board manager, with Adafruit Feather ESP32 selected (but i really doubt this has to do with the hardware, probably any ESP32 board can be tested)
The text was updated successfully, but these errors were encountered: