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

switch to (newer) Adafruit Python GPIO Library I2C module #1

Closed
wants to merge 1 commit into from

Conversation

mikostn
Copy link

@mikostn mikostn commented Jun 23, 2016

Hi,
nice work, saved me a lot of time!
I've made small updates, as original Adafruit Python Code Library library was changed, and broken into individual modules. I2C is now part of Adafruit Python GPIO Library my mod follows this change.
Sharing just in case You ware interested.

br

@sim0nx
Copy link
Owner

sim0nx commented Jun 25, 2016

Hi,

Glad you found it useful!
Thanks for sharing your modifications. I have reviewed them and commited a slightly different, more generic code.
Please have a look at the difference.... I hope you don't mind ;-)

By using I2C.get_i2c_device instead of instantiating the Device class directly, I let the Adafruit library figure out the correct busnum, instead of hardcofing one.
By hardcoding it to 1, it e.g. does not work on my rpi1.

cheerz

@sim0nx sim0nx closed this Jun 25, 2016
@mikostn
Copy link
Author

mikostn commented Jul 4, 2016

By using I2C.get_i2c_device instead of instantiating the Device class directly, I let the Adafruit library figure out the correct busnum, instead of hardcofing one.

Haven't thought of that, grate! Thanks

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.

2 participants