Librearies I2C Omega 2+



  • Hi, I was trying to communicate with a sensor using I2C, so I need to install the libraries of I2C for Omega. In other words pyOnionI2C, but when I search the files on the directory, this files are in blank. Someone could help me, sending the files with names :
    init.py
    onionI2C.so
    76d64f9a-df58-4dec-b84c-5704750a0c47-image.png .

    I tried to remove the package(pyOnionI2C) and install the again, but the error continues. I think that it's is the reason of I get error during the writting of bytes.

    Other question that I need solve, is this:
    2be34327-5cf1-4eb9-98f7-9c90fb4d3eaa-image.png
    It's okay that I've only a file named i2c_xx in the folder dev?. This implys problems? Should not have more files? That it's to say:
    i2c_0
    i2c_1
    i2c_2
    ......
    i2c_122
    etc.



  • @Victor-Lucio Please take a look at this: Official Onion Omega2 Documentation I2C Python Module.
    '/usr/lib/python2.7/OmegaExpansion/onionI2C.so' is not empty - it's an ELF binary file.

    The source code can be found in the Onion i2c-exp-driver GitHub Repo.

    An example of how the onionI2C library is used can be found in the i2c-exp-driver repo.
    The example code programs the Relay Expansion (an MCP23008 8-bit, general purpose, parallel I/O expansion IC for I2C) directly.

    Good luck.



Looks like your connection to Community was lost, please wait while we try to reconnect.