Initial code import.
Added I2C open function.