I have a High Precision AD/DA board from waveshare with Raspberry Pi 3B (running on Raspbian). With this setup, I get a sampling rate of above 20KPS at my terminal display.

However, I can write only 27 samples in 1s in my CSV file. I am using this Python code for writing to a CSV file. It seems my code is not optimized for writing at a higher sampling rate.

Could you let me know how can I write the data to my CSV file above 10 KPS sampling rate?

Note: I use following statment for writing to a CSV file :



New contributor
Varun Dhankhar is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • that statement does not write to a file
    – jsotola
    Jun 20 at 15:04
  • Hi, I am just using this data variable to store each row and then further writing the data to the CSV file using standard procedure. Jun 21 at 4:19


Your Answer

Varun Dhankhar is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.