Now I'm mearsuring analog signal from the strain sensor using Arduino!
When I got the signal in real time, I found Min/Max Value and using values to mapping&scaling.
But sometimes, high value(noise) from unstable electrode. that caused the problem in mapping range.
So I just want to fix the Min/Max value without noise.
For example, I want to receive analog signals for only 5 seconds and use the minimum maximum of them. Not the min/max in real time.
How can i adjust the time or number of analog signal recived??
Using Another loop? or Is there the way to maintain the min/max value which set first 5 second?
Solved! Go to Solution.
do you know the sample rate of your data?
Then just collect "sample rate * 5 seconds" of data in an array and get min/max of that array!
Otherwise use a (while) loop to read samples and stop the loop using ElapsedTime set to "5s" to collect your sample array…
(Nice to see you finally created your scaling function! :D)
Put the elements in an array, put the array in a shift register. If the array gets bigger than the nr. of elements, use Delete Array Elements to get the most recent nr. of elements. That will give you a point-by-point history of nr. of elements.
There's actually a build in function "Array Max & Min PtByPt.vi" (use Quick drop) that does this.