Wireless sensor question

So I’m trying to get back into Arduino after a long break and I can’t remember how to structure my program.

I have a couple of sensors I’m reading with the ADC pins. Then I process that data and generate a couple of numbers. I want to use a bluetooth radio to make my sensor wireless. I need to send out the numbers when the base station calls for it. The problem is I can’t be sure how long it will be between updates. I don’t even know for sure if the sensor is always going to be within bluetooth range of the base station.

Do you guys have any suggestions on how to structure the code so I can keep sampling and processing my data until I hear a call over the bluetooth? And is there a way to handle the event that the sensor leaves and re-enters the base stations range?

I managed to work out a new possibility. Storing all the data to flash memory until I connect the sensor to a USB port. Will that work if I just run my regular code while the serial port is not available?