Filters like moving average, median and similar with deep sleep

I have some similar examples to the above here.

Personally I prefer to process/filter on the esp side. I send the processed values only but have toggles on the esp to send raw values for debugging if required.

I found a 5 or 10 point sample worked well even for jumpy values like ADC. Typically I could wake up, measure, send and sleep in about 10-15secs.