I have some position data continually coming in and I am currently printing it to the serial.
Say I have the string "5" and want to print that to a text file, "myTextFile", what would I need to do to achieve this? To be clear, the text file would be saved on my computer not on an SD card on the Arduino.
Also, is their a way to create a text file within the program before I start saving to it?
U have to Use serial-lib for this
Write your sensor values to the serial interface using
in your loop method
on the processing side use a PrintWriter to write the data read from the serial port to a file
You can create a python script to read the serial port and write the results into a text file: