Skip to content

i2c_device reports no device, even though I2C.scan sees it #5871

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

Closed
jepler opened this issue Jan 16, 2022 · 1 comment · Fixed by #5958
Closed

i2c_device reports no device, even though I2C.scan sees it #5871

jepler opened this issue Jan 16, 2022 · 1 comment · Fixed by #5958
Labels
bug espressif applies to multiple Espressif chips
Milestone

Comments

@jepler
Copy link

jepler commented Jan 16, 2022

CircuitPython version

Adafruit CircuitPython 7.2.0-alpha.1-112-g9b32d549f-dirty on 2022-01-16; Adafruit Feather ESP32-S2 TFT with ESP32S2

Code/REPL

>>> i.try_lock(); i.scan(); i.unlock()
True
[11, 104]
>>> hex(104)
'0x68'
>>> import adafruit_pcf8523
>>> adafruit_pcf8523.PCF8523(board.I2C())

Behavior

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_pcf8523.py", line 160, in __init__
  File "adafruit_bus_device/i2c_device.py", line 50, in __init__
  File "adafruit_bus_device/i2c_device.py", line 163, in __probe_for_device
ValueError: No I2C device at address: 0x68

Description

This only happens if the pure python adafruit_bus_device is used, the built in one works. (However, they should both work the same)

Additional information

Other weirdness: adafruit_bus_device is picked up from lib/ even though the built in version is available. Why? sys.path is ['', '/', '.frozen', '/lib']. Removing adafruit_bus_device from CIRCUITPY/lib (it was put there by circup) makes it work!

@jepler jepler added espressif applies to multiple Espressif chips bug labels Jan 16, 2022
@ladyada
Copy link
Member

ladyada commented Jan 16, 2022

oh yah i saw this too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug espressif applies to multiple Espressif chips
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants