Open nyboer opened 8 years ago
Any update on this?
in line 19 you need to replace
import Adafruit_I2C
with
import Adafruit_GPIO.I2C as I2C
and in the begin function line 57 replace
self._i2c = Adafruit_I2C.Adafruit_I2C(addr, bus)
with
self._i2c = I2C.Device(addr, bus)
also, if you are using python 3, on line 234 in the _get_matrix function, you need to replace
matrix = position / 16
with
matrix = position // 16
then run the python setup.py install
command again to install the updated file.
This will allow the code to run using the new libraries, installed via
sudo apt-get update
sudo apt-get install -y python3 python3-pip python-dev
sudo pip3 install rpi.gpio
per
https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code
The instruction
Perhaps it should be
import I2C as Adafruit_I2C
then install?I hope it is so simple.