I have a classifier that is trained on a dataset sampled at 100Hz. I am using this classifier on a MCU (the teensy 4.0 dev board) for inference and not training. However, the ADC chip I am using samples at 250, 500, 1k, 2k, .... The simplest thing I can think of is set the ADC to sample at 500 Hz, and take the average of every 5 samples collected (to avoid aliasing). However, I would like to sample at 250Hz and resample to 100Hz. are there any C/C++ libraries that do this efficiently? or if not, if there is an algorithm I could be directed to, I can take it on from there.
EDIT: the ADC used is the 24-bit ADS129x chip from TI. in terms of signal processing, there is an anti-aliasing filter on the board with corner frequency of 1.1KHz, and digital IIR BP filtering between 5-20Hz.