I am looking for a way to log events from a custom "smart-device" with close to millisecond precision. The smart device is a custom board running on a TI-MSP430 chip, but I am sure that is irreverent.
Here is an example of my current data,
2018:01:11:14:06:06.872957,x,x,x,x,
2018:01:11:14:06:07.384358,x,x,x,x,
2018:01:11:14:06:07.898173,x,x,x,x,
2018:01:11:14:06:08.410788,x,x,x,x,
2018:01:11:14:06:08.922617,x,x,x,x,
2018:01:11:14:06:09.437256,x,x,x,x,
2018:01:11:14:06:09.950356,x,x,x,x,
(x is scrubbed data)
The problem is that my logging script, a barebones (and unfortunately closed source) Python script will start to break after a time. Once the script breaks, it never recovers. I assume I have a buffer issue of some sort.
Example of issue:
2018:01:11:14:31:33.385387,x,x,2018:01:11:14:31:33.543131,x,x,x,2018:01:11:14:31:33.738989,x,x,x,2018:01:11:14:31:33.856379,x,x,x,x,
The script grabs the data over serial and places it into a CSV file with the current time and some calculations. (I don't use the csv library)
Should I use the built in logger? If so, how do I get it to print in CSV format? If not, how should I proceed?
I just need some consistent, continuous data to continue.
I appreciate your help and input.