Serial console

For debugging the program, one needs to print some information such as variable values and error messages. Python has built-in command print() which does that. The output of print command is sent to serial console - which in practice just means that it is sent over USB to the computer.

Thonny editor has built-in serial console, so you can see these messages. By default, the serial console appears at the bottom of the screen.

Among other features it provides is the ability to enter Python commands interactively in the console, without saving them to a file - this is very useful for testing various things. This is called REPL (Read-Evaluate-Print Loop); see https://learn.adafruit.com/welcome-to-circuitpython/the-repl for more info.