-
Notifications
You must be signed in to change notification settings - Fork 24
I2C fails with CircuitPython 2.2.0 and Feather Huzzah #9
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 able to reproduce this:
Note: On my first power up, the device actually worked! All subsequent test have failed. I went through a lot of testing with this sensor and problems with it on the esp8266, It works well under the Arduino environment but not with the esp8266 bitbangio I2c interface. The following link is to the forum post I had regarding this. https://forums.adafruit.com/viewtopic.php?f=19&t=121816 I have been trying this with and without a 100microfarad capacitor across the power/ground. |
interesting I tried connecting the sensor to a feather M0 express (actually supersized) board and first tried the bitbangio code it failed the same as above. I then modified it to use busio and it works normally.
|
the code being used it the example from the repo with bitbangio replacing busio for the esp8266
|
some additional information: |
hmmm - here is an example of the bitbangio failing on the m0 after running successfully for awhile. Time to hook up the scope....
|
The problem appears to be that the bitbangio I2C driver does not support "clock stretching" |
Just a followup - after cleaning up my wiring I get less frequent crashes of the CCS811 on the esp8266. Still not ideal but better.... your mileage may vary. |
ran a lot of tests of I2C clock stretching - see adafruit/circuitpython#511 the ccs811 works on my feather m0 express with hardware I2C and I have run it a lot under arduino on the esp8266, but I do get occasional errors with it and have to reset the board even under arduino. |
@jerryneedell do you think there is anything else we can do to fix this or should we close the issue? |
I suggest closing it and we can re-open or create a new one it if becomes a problem for someone. |
Sounds good! Thanks! |
Connecting CCS811 to a Feather HUZZAH ESP8266 using bitbangio and adafruit_ccs811.mpy.
Example typed into REPL:
Adafruit CircuitPython 2.2.0 on 2018-01-02; ESP module with ESP8266
from board import *
import bitbangio
import adafruit_ccs811
i2c=bitbangio.I2C(SCL, SDA)
ccs=adafruit_ccs811.CCS811(i2c)
Traceback (most recent call last):
File "", line 1, in
File "adafruit_ccs811.py", line 113, in init
File "adafruit_register/i2c_bit.py", line 40, in get
File "adafruit_register/i2c_bit.py", line 39, in get
File "adafruit_bus_device/i2c_device.py", line 94, in write
OSError: [Errno 5] EIO
Talked to jerryn on the Adafruit Discord and after some troubleshooting, they suggested that I post an issue.
The text was updated successfully, but these errors were encountered: