Added I2C read and write functions