Fixed some bugs in I2C functions.
Added an example project using I2C.