.
You have a multitude of multi-byte variables shared between interrupt and non-interrupt (loop()) code. Those variables should only be read when interrupts are disabled, otherwise they could be corrupt.
.
.
You have a multitude of multi-byte variables shared between interrupt and non-interrupt (loop()) code. Those variables should only be read when interrupts are disabled, otherwise they could be corrupt.
.