Hi -
I've a challenge in the enclosed code; I'm using array (10000), storing moving median values from the sampled data, but do not know how to clear the array as defined value of 10000 accumulates in Array.
Hi -
I've a challenge in the enclosed code; I'm using array (10000), storing moving median values from the sampled data, but do not know how to clear the array as defined value of 10000 accumulates in Array.
First, readers here are not likely to open and read a file with unknown content. Post the code using code tags as explained in the How to Use This Forum post by Nick Gammon at the top of the Forum. Second, given you have very limited memory resources, how are you going to define an array with 10000 elements in it?
You also don't seem to be able to use the enter key, or the Tools + Auto Format menu item.
Nor do you seem to have a clue how many digits of precision a float has.
a, b, c, and d are stupid names. You KNOW what they mean, so use THAT name for the variables.
What array do you think can hold 10000 values? On which Arduino? When does the array need clearing?
Just to answer the question, do a search for memset().