Method to write data from an I2C master to an I2C slave