Definition of read and write methods for I2C protocol
Add mutex to control flow between program and interrupts