I'm working on a project with makes me read values from my Arduino Mega and use it in a game engine software based on C#. Now I need to write the SerialPort data to CSV. Can someone please put me through this?
There needs to be some application listening to the serial port. That application needs to collect the serial data, and write it to a file, with commas between the values, and save the file with a .csv extension.
What part of this do you need help with?
Yes, I used the C# SerialPort class to read the data(decimal values), and use it in my game engine. But now, I want to write those same values to csv. I'm a beginner. Thanks
Search www.codeproject.com for csv classes as that is a C# forum
I did, but still dont understand most of the things I saw there. I splitted my values from the SerialPort and have something like array....array, and this is what I need to write as a CSV. Please I need help
I splitted my values from the SerialPort and have something like array....array, and this is what I need to write as a CSV.
This no longer has anything to do with Arduino. Grab a C# book, and look up how to create a file (which returns an input stream and/or output stream). Look up how to use that stream to write data to the file. The fact that the file needs to have an extension of .csv, and that the values written to the file need to be separated by commas is completely extraneous to the task of writing data to a file.
C# book is one way, or just google a little - here's one useful result: How to write to a text file - C# Programming Guide | Microsoft Learn
Will check that up, thanks