Added helper functions for I2C communication.