Esempio n. 1
0
def getbyte(address, cmd):
    while True:
        try:
            byte = c2py.readbytedata(address, cmd, 1)
            break
        except c2py.I2CError:
            pass
    return byte
Esempio n. 2
0
def checkjointio():
    try:
        c2py.readbytedata(ADDRESS, JOINTIO_OUTPUT_READ, 1)
    except c2py.I2CError:
        return False
    return True