I2C Resource Busy



  • If I use i2cget to read a byte from a connected I2C device I get:

    root@Omega-0849:~# i2cget -y 0 0x10 0x00
    Error: Could not set address to 0x10: Resource busy
    

    If I use the force option I can successfully read a byte:

    root@Omega-0849:~# i2cget -y -f 0 0x10 0x00
    0x54
    

    Also when using the python onionI2C module I'm receiving an error:

    root@Omega-0849:~# python test.py 
    Could not find platform dependent libraries <exec_prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Traceback (most recent call last):
      File "test.py", line 4, in <module>
        readVal = i2c.readBytes(0x10, 0x00, 1)
    IOError: I2C transaction failed.
    

    This is my Python code:

    from OmegaExpansion import onionI2C
    
    i2c = onionI2C.OnionI2C()
    readVal = i2c.readBytes(0x10, 0x00, 1)
    print readVal
    

    Any idea why this would be happening?


Log in to reply
 

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