How to read output from photon

I am seeing libraries and sample code that use .print() and .println(), where do these prints go? How can I read what they’ve outputted?

You’d need to look at the part left of the dot .

Serial.print() prints to the serial USB port
Serial1.print() to the TX pin of serial USART port
TCPClient.print() - take a guess :wink:

1 Like

Can you explain what it means for the output to go to Serial.print()? Do I need to install a driver onto my computer that will have the data displayed?

It’s described here in the docs - “Connecting Your Device”

https://docs.particle.io/guide/getting-started/connect/photon/

I hope that makes things clearer for you. :smile:

Thanks for this resource! I’ve installed the Particle CLI and am able to login to my account through the command prompt and can see that my device is online but how do I go about seeing the output?

You know, I was sure the getting started docs mentioned serial monitoring, but I didn’t see it.

Anyhow, the information you’re looking for is in the CLI

https://docs.particle.io/reference/cli/#particle-serial-monitor

1 Like