separated i2c functions from main into separate c
fixed memory values