Electron output to text file?

Hi,

Is there way to print data to a text file on my PC’s hard drive ?

Something like Serial.printfile …

I would like to save my debug info to a file.

Assuming you have your Electron connected by USB to your computer, you can just do this from the command prompt:

particle serial monitor --follow > log.txt

That will save the output to the file log.txt instead of printing it to the command prompt.

For Linux and Mac, you can both save to a file and print to the terminal at the same time (this probably works in Cygwin under Windows as well):

particle serial monitor --follow | tee log.txt
3 Likes

Many thanks :slight_smile: