-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add support for i2c-gpio overlay pins on BCM283x #79
Comments
we should at some point allow people to use this, but the instructions was a typo so ignoring for now and fixing instructions :) |
I patched microcontroller/bcm283x/pin.py and busio.py to allow for this on D4 and D17 |
Is the current way to use It's working for me, but I just want to make sure I haven't missed an easier (or the official) way. |
I created a new library that allows you to do this. It's available at https://github.com/adafruit/Adafruit_Python_Extended_Bus/releases It allows you to create an I2C object by passing the Bus ID instead of some pins. Since it extends the busio I2C object, it should be compatible. It only works with Linux boards, but those seem to be the only one having this issue. Closing this for now. If you have any problems, please open an issue in the new repository. |
When using the
i2c-gpio
overlay with default settings, it will be given bus number 3 and the SDA/SCL pins will be on 23 and 24:(i2c-1 is the hardware i2c port)
To allow use of this feature, need to add an entry to
i2cPorts
so the i2c bus can be created using those pins:The overlay allows for assigning the bus number and pins when enabling it in /boot/config.txt. But I'm not sure how non-default settings could be handled. The blinka constructor has no concept of bus number, so it all keys off the pins.
The text was updated successfully, but these errors were encountered: