Hello, I am generating random numbers in Arduino Uno, and studying them (I realize they are pseudo random, and with a seed capability) so far I have been manipulating on the serial mon, and also just streaming them to the mon, and observing. I am operating on COM(3).
I am sure there is easy way to import serial data to a txt file, using simple and native Windows 10 facilities, via the command window, but I cant figure it out. One place suggested the command C: type COM(£) >> datafile.txt, but this did not work. Can anyone provide a simple answer to this? I just want CSV format, in a simple txt file. Thx, Steven Lightfoot
Easiest way:
send UART from CMU as a "formatted" text file, e.g. as CSV:
values separated with comma.
Now, you can "copy and paste" from UART terminal on PC and paste into a text file, as SCV even as Excel Spreadsheet.
Getting directly your UART into an App - needs programming for the App. Very complicated.
Easier would be:
send a format which you can "copy and paste"
CSV is very common, very convenient:
just: separate the values (e.g. as decimal value, hex via 0x.... is tricky in Excel)
with a comma
optional:
print like a table: you print also a header, also separated names with comma
Now you just copy and paste the entire UART screen content into an Excel file.
Works pretty easy.
Are the random numbers you are generating integers, long integers, or what? Any data going to a .CSV file must be ASCII characters, not the binary based numbers you are using in your study. So you will have to do a conversion on each of your random numbers and then put that into a .CSV file.
many terminal emulators, e.g. teraterm, have a log facility which as serial data is received it is copied into a text file which can be processed later
alternativly you can write a program (in C, C++, C#, Java, Python, etc) which opens a serial port, receives data which can be processed as required and presented on a GUI as text, graphs, etc
Do you have any experience with PuTTY? I am computer literate, but out of practice. Years ago I recall having called SerialMon, but now just assumed that a serial monitor comes with Windows 10, but apparently it does not, and you DO need to get a third party serial monitor/emulator....Any insights? Thx
I use teraterm most of the time but also realterm which is much more sophisticated allowing display of data in multiple formats etc but has a more complex GUI
I also have PuTTY on my PC plus some terminal emulators I have implemented in C++,C# and Java for processing of serial data for particular applications
OK thanks a lot. I assume they are safe to use, free of malware, etc. Maybe I will try teraterm, I dont have any coding skills for this, per se, I just need something to work, and read serial data sent via Arduino on my COM port 3...
Hey again, so I looked into Tera Term, looks good, from Japan, lots of history documentation, and well maintained. Probably way more than I need, but I may use it.
All I really need is a simple way (via terminal or other) to import reams of serial data from Arduino on COM port, and into a txt file.
Thanks, unfortunately I don't know Python, I am learning CPP via Arduino, and have background from decades ago in FORTRAN and BASIC. Maybe I will learn Python one day.
Thank you so much, I now have Tera Term, it works perfectly and I can log serial data and then transfer to a spreadsheet from txt file. Really appreciate. I love the Arduino community.
Thanks! I am pretty new to this, Tera Term works perfectly for what I need now, is there any significant advantage to using other terminal emulator programs?
use what meets the requirements of the application and is the easiest to use
teraterm is simple to use
realterm has more functionality but is therefore more complex to use
if you require some specific functionality you end up writing your own, s. post arduino-code-to-report-port-number-name has a program which scans serial port sending a prompt charcter '?' looking for a response "Arduino Mega Here!" - it is implemented in Java and runs on both Windows and Linux based systems