did you install smbus? It is a prerequisite. --- Graham On Thu, Oct 4, 2018 at 10:34 AM Dennis Lee Bieber <[email protected]> wrote:
> On Wed, 3 Oct 2018 20:15:04 -0700 (PDT), Chris Bohler > <[email protected]> declaimed the > following: > > > > >When attempt to execute Adafruit_BBIO.I2C as I2C: > > "Adafruit_BBIO.I2C deprecated. Replace with Adafruit_GPIO.I2C" > > > > Note the message says "deprecated", not that it is no longer > usable. > > > > File > >"/usr/local/lib/python2.7/dist-packages/Adafruit_GPIO-1.0.3-py2.7.egg/Adafruit_GPIO/I2C.py", > > >line 98, in __init__ > > import Adafruit_PureIO.smbus > >ImportError: No module named Adafruit_PureIO.smbus > > > > Looking at the source code for I2C > > """ > def __init__(self, address, busnum, i2c_interface=None): > """Create an instance of the I2C device at the specified address on > the > specified I2C bus number.""" > self._address = address > if i2c_interface is None: > # Use pure python I2C interface if none is specified. > import Adafruit_PureIO.smbus > self._bus = Adafruit_PureIO.smbus.SMBus(busnum) > else: > # Otherwise use the provided class to create an smbus > interface. > self._bus = i2c_interface(busnum) > """ > > you can bypass Adafruit_PureIO by providing your own interface object. I > have not looked deeper into what such an object would be. > > >This from simple python code: > > > >import Adafruit_GPIO.I2C as I2C > >import Adafruit_BBIO.GPIO as GPIO > > I suspect if you are using Adafruit_GPIO you should also use > > import Adafruit_GPIO.GPIO as GPIO > > (that, itself, imports Adafruit_BBIO) > > > > -- > Wulfraed Dennis Lee Bieber AF6VN > [email protected] HTTP://wlfraed.home.netcom.com/ > > -- > For more options, visit http://beagleboard.org/discuss > --- > You received this message because you are subscribed to the Google Groups > "BeagleBoard" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/beagleboard/gtbcrd585viblrvujp5e3ntgo6nq0pjkgl%404ax.com > . > For more options, visit https://groups.google.com/d/optout. > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CANN_KV5cfsAd19zVKwiW9HzLA%3DZqFJC4-p4CL19eFG5MFe0BWA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
