Yeah, that was easy to figure out. The tricky part was finding a way of reading the sensors and logging their data (which takes quite a few hundreds of instructions) and then returning to the main thread where work was left off. And I did that by using the interrupt vector as a node from which the logic would branch back and forth.This is why your receive interrupt routine should simply receive a character into a queue and promptly return to the main program for later processing, which your tl;dr solution seems to be doing.
This is (or should be) standard practice.