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

change of sda scl pins #2

Open
gokulvenkat opened this issue Dec 21, 2022 · 2 comments
Open

change of sda scl pins #2

gokulvenkat opened this issue Dec 21, 2022 · 2 comments

Comments

@gokulvenkat
Copy link

your work looks great and hatsoff to you and your team .i need to assign different pin for scl and sda so can you include a line to change the pin number.thanks in advance and have a great day

@hjmassey
Copy link

Add this line after 'import time' line (around line 16)
from machine import Pin, I2C

Change this line (around line 141)

from:

i2c = machine.I2C()

to

i2c = machine.I2C(sda=Pin(11), scl=Pin(12))

Replace 11 and 12 with your pin numbers (11 and 12 are the pins on the Arduino Nano ESP32).

@stewartaubrey
Copy link

I had to adjust the change above to this adding the bus # and freq to get it to run on an RP2040-zero:
i2c = machine.I2C(0, scl=Pin(5), sda=Pin(4), freq=400000)

Love the large font and work you did. The baseline font is almost unreadable.

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

3 participants