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 (Shell), so you can see these messages.

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/adafruit-itsybitsy-rp2040/the-repl for more info.