Really quick question guys:
What is the biggest array size you can have in the Web IDE?
Thanks
Really quick question guys:
What is the biggest array size you can have in the Web IDE?
Thanks
array of what?
an array of numbers. declared as a double
Quick questions still need to state important details
The limit is not the number of items and not the IDE, but the available memory (flash or main RAM or stack).
What data will you store and where?
im using an Electron to capture data from a sensor. I want to graph this data. The bigger the array, the better the resolution of the graph. I just wanted to know how big it could get. I guess I could find that data out after compiling the code
Yup, that’s the way to do it, since your array (8 byte per double) will need to share the RAM with all your other variables, the heap and stack area, so there won’t be one correct answer, but you can play with sizes and see how the mem stats work out.
Agree with @ScruffR … although I would advise using floats. At 4 bytes per, you’ll get twice as many of them. They are precise to around 7 significant digits, and I doubt your sensor is more precise than that. Better yet, store the raw data that comes off the sensor. If, for example, you are using the internal A/D converter (analogRead), you can store the values in 2 bytes (short), getting twice as many values again.