@Garrett, as @ScruffR pointed out, you include the SparkIntervalTimer.h
file but you don’t actually use any portion of that library. Also, I agree with his suggested fix for the for-loop as your index will go out of bounds since the array is declared as microMonitor[49]
, with an index range of 0 to 48.
Your loop() code has two elements that slow it down. The first being tcpPrint() and and the second being the system firmware background task which runs whenever loop() completes. As @ScruffR pointed out, that can take less than 1ms to possibly 5ms depending on the SYSTEM_MODE() and the status of the wifi/cloud connection.
High speed ADC sampling has to be decoupled from any “uncontrolled” timing conditions to work. As such, you can use hardware timer interrupts (via SparkIntervalTimer) coupled with a sampling queue/buffer that gets “serviced” in loop(). It can be a fixed buffer that once it is filled, ADC sampling stops until the buffer is serviced or a circular buffer which holds the latest N samples. This allows continuous sampling at the expense of possible loss of contiguous samples if loop() is not servicing the buffer fast enough.
I believe there are topics dealing with ADC sampling so a Community search is recommended.