New housing, new bugs: I2C Scan failing

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
RoseNose
 
Posts: 17
Joined: Thu Jan 25, 2018 2:50 pm

New housing, new bugs: I2C Scan failing

Post by RoseNose »

Hey,
I've moved a subset of my large daylight alarm clock into a tin can for travel, it was all working just fine until I put it in a new housing. Specifically I'm working on a Feather RP2040 using neopixels, an oled, RTC, and stemma rotary encoder seesaw (and two buttons). I've unfortunately just soldered up my first perma-proto, so I'm really hoping to fix it in place if possible, not replace the board. Code and Error:

Code: Select all

import board
i2c = board.I2C()
i2c.try_lock()
print(i2c.scan())

Code: Select all

code.py output:
Traceback (most recent call last):
  File "code.py", line 4, in <module>
TimeoutError: Clock stretch too long

Code done running.
For trouble shooting I've tried a reset, a reflash, and wiped the drive. Upon reflection I think I may have swapped the OLED for a knockoff in the switch, do different I2C peripheral use different clock speeds? Luckily that's on with just a plug to undo.

User avatar
dastels
 
Posts: 15656
Joined: Tue Oct 20, 2015 3:22 pm

Re: New housing, new bugs: I2C Scan failing

Post by dastels »

Yes, some I2C devices need different clock stretching. Can you try switching back to the original OLED board?

Dave

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”