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:
This line would result in:
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.
If so, good news! The serial console is built into Mu and will autodetect your board making using the REPL really really easy.
Please note that Mu does yet not work with nRF52 or ESP8266-based CircuitPython boards, skip down to the next section for details on using a terminal program.
First, make sure your CircuitPython board is plugged in. If you are using Windows 7, make sure you installed the drivers.
Once in Mu, look for the Serial button in the menu and click it.
On Linux, if you see an error box something like the one below when you press the Serial button, you need to add yourself to a user group to have permission to connect to the serial console.
On Ubuntu and Debian, add yourself to the dialout group by doing:
sudo adduser $USER dialout
After running the command above, reboot your machine to gain access to the group. On other Linux distributions, the group you need may be different. See Advanced Serial Console on Mac and Linux for details on how to add yourself to the right group.
If you're not using Mu to edit, are using ESP8266 or nRF52 CircuitPython, or if for some reason you are not a fan of the built in serial console, you can run the serial console as a separate program.