I am readingdata from a sensor but wanted to filter the data for every 2 sec samples(The data is very noisy). From various sources on the internet, it seems only be possible to filter data from an array. How can I store the data into an array (10 data points) every 2 seconds in C#.The temperature data is a double value.
double analogDataIn = reader.ReadSingleSample();
double analogTemp = (analogDataIn * 100) - 50;
I would suggest using a List<double>
adding values until you have a list length of 10. Then simply call List.ToArray()