Is it possible to run a while loop for 50ms, that keeps reading out a Analogue Sensor and that stores the smallest and biggest number it gets in an array.
If i Have an array: int MinMaxVal[1];
that the while stores int MinMaxVal[0] with the smallest and int MinMaxVal[1] with the biggest.
I feel its possible, but i'm kinda stuck on how to compare inside the while loop.