Then select Serial Monitor from the Tools menu. Select the port from the Port hierarchical menu in the Tools menu. To close (kill) a screen session, press Ctrl-A then press k. Then issue the command: screen /dev/ttyACM0 It should return something like /dev/ttyACM0. Linux - using screenįind the serial port that is being used using the Terminal program command line: ls /dev/ttyACM* Screen allows you you both send characters to the Photon or Electron as well as receive them from the USB serial device. Then issue the command: screen /dev/cu.usbmodemFD1161 It should return something like /dev/cu.usbmodemFD1161. Mac - using screenįind the serial port that is being used using the Terminal program command line: ls /dev/cu.usb* This is the configuration screen for PuTTY:Ĭlick Serial (1) then enter the COM port number (2) then click Open (3). It's hard to say what COM port your Photon or Electron will use, but if you open the Windows Device Manager and expand Ports (COM & LPT) it should show the device. Windows - using PuTTY or CoolTermįor Windows, you can also use a program like PuTTY or CoolTerm. In Particle Workbench (VS Code), open the command palette (Command-Shift-P on the Mac, Ctrl-Shift-P on Windows and Linux) and select Particle: Serial Monitor. Opening serial monitor for com port: "/dev/cu.usbmodemFD1161" 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