UB948 = 0x58 board.WriteI2C(UB948,0x68,0x19) # H active High monitor Hhigh = board.ReadI2C(UB948, 0x69, 1) board.WriteI2C(UB948,0x68,0x09) # H active Low monitor Hlow = board.ReadI2C(UB948, 0x69, 1) board.WriteI2C(UB948,0x68,0x39) # V active High monitor Vhigh = board.ReadI2C(UB948, 0x69, 1) board.WriteI2C(UB948,0x68,0x29) # V active Low monitor Vlow = board.ReadI2C(UB948, 0x69, 1) mask = int('00111111',2) hlowmask = Hlow & mask hhighmask = Hhigh & mask vlowmask = Vlow & mask vhighmask = Vhigh & mask hhighmask = hhighmask << 6 vhighmask = vhighmask << 6 Hactive = hhighmask | hlowmask Vactive = vhighmask | vlowmask print Hactive ,"x", Vactive #print out detected Dimensions board.WriteI2C(UB948,0x68,0x0) #Disable readback feature