Skip to content
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

Bug with defining I2C object with both I2C Bus ID and pins on ESP32 #7524

Open
CurlyTaleGames opened this issue Jul 11, 2021 · 0 comments
Open

Comments

@CurlyTaleGames
Copy link

I have the issue pretty well documented here with some screenshots:
https://forum.micropython.org/viewtopic.php?f=15&t=10635&p=59456

When I defined an I2C object and passed in the I2C Bus ID and also defined the SCL and SDA pins I couldn't get I2C frequencies faster than 15khz

When I removed the Bus ID I was getting speeds of 85khz

When I used the Bus ID and removed the SCL and SDA pins and switched to the default pins I got 100khz

# This one would only work with a frequency of 15khz max:
i2c = I2C(0, scl=Pin(22), sda=Pin(21), freq=15000)

# This one would work but I was only getting 85khz when I defined 100khz
i2c = I2C(scl=Pin(22), sda=Pin(21), freq=100000)

# This one is working correctly and I'm seeing 100khz
i2c = I2C(0, freq=100000)
# I2C bus 0 default pins:
# scl = 18
# sda = 19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant