


Still, it's quick and easy, and very handy. Note that the CLI only reads serial messages, it is strictly a serial monitor, and you can't type things to the Photon/Electron. Particle CLIĪ common way to view debug serial messages is the Particle CLI. The Serial.printlnf prints a formatted string to the debugging USB serial. In fact, youĬan just omit the baud rate entirely and use Serial.begin(). Sometimes you'll see Serial.begin(115200) but it really runs at the same fast speed regardless.

When you're using the USB serial, the value doesn't actually matter. The Serial.begin(9600) call initializes the serial port. Serial.printlnf("testing %d", ++counter) Often this is used for debugging messages. The USB serial provides a way for the Photon/Electron to send data to the computer across the USB connection. Learn about serial ports, UARTs, USB serial ports, RS-232, and more! USB serial
