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.
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.