add I2C function

haven't tested I2C