-
Notifications
You must be signed in to change notification settings - Fork 328
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
busio I2C import on RPi #49
Comments
Found the same thing @magnus-haw - here's a PR that I hope will get merged soon :) |
@magnus-haw Thanks! |
we're about to fix this with a different PR, hold tight! |
apologies for the break. lots of dev goin' on |
that (0.3.1) broke something (0.3.0 worked after changing that one "if" to "elif") fix with |
hmm - lemme take another look |
ok i think it's cause i forgot a init.py file - fun times! new release coming soon |
OK please try 0.3.2! |
i think this is resolved now, @brennen tested it. closing - please reopen if it's still an issue |
no pin.py in generic_linux ? only in raspi_23. |
thats correct, we have not done our libgpiod changes so pin control is still board specific |
k! |
Line 21 in busio.py should have an "elif" statement instead of an "if" statement. Currently, if the board is not a beaglebone_black, the code attempts to execute the last else statement. This creates an error for Raspberry pi boards which do not use the Micropython machine module.
Discovered this issue when trying to install CircuitPython from this tutorial: https://learn.adafruit.com/circuitpython-on-raspberrypi-linux/installing-circuitpython-on-raspberry-pi
def init(self, scl, sda, frequency):
self.deinit()
if board_id == "raspi_3" or board_id == "raspi_2":
from adafruit_blinka.microcontroller.raspi_23.i2c import I2C as _I2C
if board_id == "beaglebone_black":
from adafruit_blinka.microcontroller.raspi_23.i2c import I2C as _I2C
else:
from machine import I2C as _I2C
->>>
def init(self, scl, sda, frequency):
self.deinit()
if board_id == "raspi_3" or board_id == "raspi_2":
from adafruit_blinka.microcontroller.raspi_23.i2c import I2C as _I2C
elif board_id == "beaglebone_black":
from adafruit_blinka.microcontroller.raspi_23.i2c import I2C as _I2C
else:
from machine import I2C as _I2C
The text was updated successfully, but these errors were encountered: