12 Replies Latest reply on Nov 6, 2015 8:29 AM by neuberfran

    problems to use python-smbus to control driver i2c of the Openelectrons

    neuberfran

      Hi guys,

       

      Following this site: https://communities.intel.com/thread/61160

       

      I do this:

       

      pip install cffi

       

      and then:

      pip install smbus-cffi


      After I tried install run python scrit to detect i2c address in my intel edison and I have error with python-smbus

       

      root@edisonb:~/opt# python explorer1.py

      Connect I2C device...

      Traceback (most recent call last):

        File "explorer1.py", line 31, in <module>

          i2c = explorerlib.Explorer(addr)

        File "/home/root/opt/explorerlib.py", line 35, in __init__

      OpenElectrons_i2c.__init__(self, explorer_address >> 1)

        File "/home/root/opt/OpenElectrons_i2c.py", line 57, in __init__

          self.bus = smbus.SMBus(b)

        File "/usr/lib/python2.7/site-packages/smbus/smbus.py", line 56, in __init__

          self.open(bus)

        File "/usr/lib/python2.7/site-packages/smbus/smbus.py", line 83, in open

          raise IOError(e.errno)

      IOError: 2

       

      Help me please