One of the staples of CircuitPython (and programming in general!) is something called a "print statement". This is a line you include in your code that causes your code to output text. A print statement in CircuitPython looks like this:

print("Hello, world!")

This line would result in:

Hello, world!

However, these print statements need somewhere to display. That's where the serial console comes in!

The serial console receives output from your CircuitPython board sent over USB and displays it so you can see it. This is necessary when you've included a print statement in your code and you'd like to see what you printed. It is also helpful for troubleshooting errors, because your board will send errors and the serial console will print those too.

The serial console requires a terminal program. A terminal is a program that gives you a text-based interface to perform various tasks.

Serial Console on Mac and Linux

Connecting to the serial console on Mac and Linux uses essentially the same process. Neither operating system needs drivers installed. On MacOSX, Terminal comes installed. On Linux, there are a variety such as gnome-terminal (called Terminal) or Konsole on KDE.

To connect to the serial output, you'll use the screen command. For a detailed explanation of how to connect to the serial console using screen, please see the Advanced Serial Console on Mac and Linux page in this guide.

Serial Console on Windows

If you're using Windows, you'll need to download a terminal program. We suggest PuTTY. First, download the latest version of PuTTY. You'll want to download the Windows installer file. It is most likely that you'll need the 64-bit version. Download the file and install the program on your machine. If you run into issues, you can try downloading the 32-bit version instead. However, the 64-bit version will work on most PCs.

You'll use PuTTY to connect to the serial output. For a detailed explanation of how to use PuTTY to connect to the serial console, please see the Advanced Serial Console on Windows page in this guide.

This guide was first published on Oct 31, 2018. It was last updated on Oct 31, 2018.

This page (Connecting to the Serial Console) was last updated on Nov 25, 2021.

Text editor powered by tinymce.