Added i2c example and fixed register script