Skip to content

Update CP I2C Scan Example #1925

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

Merged
merged 3 commits into from
Nov 17, 2021
Merged

Conversation

caternuson
Copy link
Contributor

An attempt to update code example to show creating I2C bus manually. QT Py 2040 and Pi Pico are two good examples where existing code does not work and lot's of users end up running into this.

@caternuson caternuson requested a review from kattni November 17, 2021 20:50
Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. One thing below.

Comment on lines 2 to 6
# If you run this and it seems to hang, try manually unlocking
# your I2C bus from the REPL with
# >>> import board
# >>> board.I2C().unlock()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this, as it is explained in the guide page associated with this example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool. thanks. i wanted to do that anyway. wasn't sure.

Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing, sorry!

Comment on lines 2 to 6
# If you run this and it seems to hang, try manually unlocking
# your I2C bus from the REPL with
# >>> import board
# >>> board.I2C().unlock()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not being clear. Please leave it in this copy of the code, it is not explained in the Essentials guide, only in the template page.

@kattni
Copy link
Contributor

kattni commented Nov 17, 2021

@caternuson Thanks for adding this!

@TheKitty TheKitty merged commit d670ab4 into adafruit:main Nov 17, 2021
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

Successfully merging this pull request may close these issues.

4 participants