The code now works in cooperation with the demo I2C application.