exporting a variable from i2c to void loop

DrAzzy:
You must also declare the global sensor variable as volatile, since you are changing it within an ISR.

Don't think receiveEvent() is an ISR, they don't take arguments.