Sending variables using I2C and Java.

Global variables access in interrupt context need to be declared volatile otherwise the compiler might optimize them away or use old values.

Hint: sendData() is called in interrupt context.