How to save multiple arrays to one csv file?

I have interfaced and Arduino with 2 different sensors (Temperature and pressure) having different sampling rates. I have established the serial communication with Processing and saved the data in a csv file. I have saved the data along with the timestamps. With a single sensor data, csv file store data without any problem. (I am using separate Serial lines to obtain data for each sensor.)

However, with both the sensor data have saved every other cell in the excel sheet column along with the timestamps (2 sensors have different sampling rates: 5 Hz and 50 Hz).

How can I overcome the data saving skipping cells?
I need multiple data columns without unfilled cells.

1 Like

why not just send from arduino

40000,1023,1023,

with long timestamp ?seconds? and 2 measurements.
what will be updated/change whenever there are new data.

transport, evaluation, storing array or csv file, plot: all default

The main problem is I have different sampling rates of the 2 sensors. It obvious I will get more data points for 1 sensor and I needed them seperated and I have used a character marks to identify the data. I have established 2 different arrays to each sensor. Any how I need both the arrays to be stored in one data file.
(Like a 2 arrays in a cell structure)