i2c eeprom read and write error

  1. I2C EEPROM read returns error " EXCEPTION of type 'UnboundLocalError' occurred with message: 'local variable 'device' referenced before assignment' "

  2. Not working for chips more than 64K