I am currently using a Teensy 3.2 to log data from a sensor. My current strategy is to print the sensor data onto the serial port using a 115200 Baud rate. I then use Putty to log the serial data into a CSV file.
The serial port really limits the amount of data samples I can log per second. I want to log as fast as I can. Ideally, I would like to log as fast as I sample the sensor data, but I believe that may be too difficult without an RTOS.
In general, what are the best ways to log data as quickly as possible. I have seen two approaches so far:
Use an SD card and write to the SD card. After this, convert that data to a CSV.
Store all the data in an array, and then serial.println the array and log that into putty. Writing to the array should be faster, and thus you can collect more data points.
Are there any other ways to go about this? Do you think just writing straight to a CSV as opposed to the serial port would be faster?