Closed lcongdon closed 3 years ago
What sensors specifically do you have issue with? How long are the wires you are using to connect them?
The problem occurs with the PCT2075, the SGP40, and the BHT1750. Each fail with either 2 inch or 4 inch cables. I have reverted to CircuitPython 6.3.0 due to other issues with 7.0.0 alpha and the issue is present in 6.3 as well.
I did want to see if this was an issue specific to Funhouse vs a broader issue with ESP32-S2. I tried this with the ESP32-S2 PixelWing I just had added and tested with 7.0 Alpha with two i2c boards. One the MPU-6050 and the other the 1.3" OLED display.
I wasn't able to replicate the issues with my ESP32-S2 board so it's possible it could be isolated to Funhouse.
I have a FunHouse and tried with a PCT2075, BH1750, SGP30 (all concurrent) with CircuitPython 6.3.0. I was able to instantiate an object for all the sensors and the FunHouse object without issue. I repeated the test under 7.0.0-alpha.6 without issue. I don't have an SGP40 to test.
I even tried pulling A0 on the PCT2075 high to make its i2c address 0x77 and couldn't reproduce the "No I2C device at address: 77" error. (It didn't work, but didn't generate the same error)
@lcongdon Let's see if this is a possible hardware problem. Thanks.
I tested the Funhouse and added 2 breakouts with stemmaqt connectors, the apds9960 and the vl6180. The i2c and the Funhouse house worked perfectly. I tried it with both adafruit-circuitpython-adafruit_funhouse-en_US-7.0.0-alpha.6.uf2 and the latest file adafruit-circuitpython-adafruit_funhouse-en_US-20210817-5b0009c.uf2. I was using 100m stemma cables between the Funhouse and both breakouts. Also the on board aht20 was funning during all of the test. All okay for me.
@dhalbert, your question prompted a close inspection of the I2C socket on the FunHouse and there is a bent pin. Thanks for looking into this.
@dhalbert, your question prompted a close inspection of the I2C socket on the FunHouse and there is a bent pin. Thanks for looking into this.
Glad it was easy to spot. Thanks for checking. Sometime's it just mechanical!
@skerr92, @dgriswo and @KingerNorth thanks also for checking. I incorrectly assumed a software problem. Working for me now as well.
CircuitPython version
Code/REPL
Behavior
I2C fails on FunHouse if an external I2C sensor is attached.
With no external I2C sensor attached, onboard sensor functions as expected:
Attaching an external sensor causes I2C to fail for both onboard and external sensors.
Description
FunHouse functions as expected with no external I2C device attached. Adding an external sensor causes the I2C bus to fail.
Additional information
Error occurs with different sensors, different cables, and in two versions of CircuitPython.
At times, the I2C scan works as shown in the example. At times, it hangs.
This problem also occurs when using the FunHouse layered software. That is, the fragment:
fails when an external sensor is attached via I2C.