Electron output to text file?


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

Many thanks :slight_smile: