I'm really new to Processing, downloaded it just yesterday. I have an Arduino microcontroller and want to use it to log a force sensor. What I want to do on a larger scale is read the force sensor data from Arduino and then get, using triggers sent from another program, averages for certain length of force sensor data after each trigger.
How I suppose this would work is that Arduino sends data out, this is read in Processing. From the other program, we get triggers (impulses of certain value and length) and when a trigger is recieved in Processing, it would write force sensor data from trigger onset for a certain duration (e.g. 1000 ms) into an list. So in the end there would be a list of lists, and out of all these lists an average for a section could be counted (and other measures, such as standard deviation).
This is for scientific research purposes, where we study how grip force, measured via force sensors, changes during presentation of different stimulus (handled by the other program, Presentation). We need temporally accurate data, so it's vital that the timings are reliable and accurate. I also found a function of gwoptics that can output a rolling graph. If it would be possible to use this to plot port values on the y-axis and time in milliseconds on x-axis, this would be a really convenient method to evaluate the raw-data online during measurement.
Sorry if the explanations are confusing, I hope someone understands them and can help me out. What I want to know is are the scenarios mentioned above possible and easily achievable with Processing? Both the averaging process and visual plotting. Intuitively this doesn't seem too complex (except for the plotting part, but since there's a readymade function, I think it should be plausible) but since I'm not familiar with Processing I have no real idea if this is something it is suited for. I don't want to spend a lot of time investigating the subject only to find out that it's not possible, so I thought better to ask first. If it's not possible (or at least not with reasonably little effort) then I'll just have to look for other solutions better suited for the task. Oh and if Processing is suited for this tyhpe of thing, all solution proposals are very, very welcome.