handle a big and dynamic array / event when closing the program ?

hello,

i'm new in processing, just discover this interesting world and starting to do stuff with it ...
i know web language (as/php/js/...) and a little (very little) C/C++/C# and delphi.

this is the project i have done so far :

  • i read the serial data received from an arduino (temperature) (conversion string to float)
  • every second i create an average temperature with the last data and add a plot on a graph
  • when the graph is full, i save all the data to a file and start a new graph

this is a visual :

problems :

  • handling a big "dynamic" float array (so far i use a Table) (1 hour = 3600 float / 24 hours = 86400 float)
  • saving all the data to a file when the program is closing

questions :

  • i don't know how many data i have to store and the array or arrayList can't handle dynamic array ... what's the best data type for this project ?
  • can't find an event to trigger when the program is closing, please tell me there is one !??

thank's

Tagged:

Answers

Sign In or Register to comment.