Thonny Python IDE
A lightweight Python integrated development environment (IDE) that is ideal for beginners writing simple Python programs for first time users. It has been modified to work well with the Raspberry Pi Pico. It supports different ways of stepping through the code, step-by-step expression evaluation, detailed visualization of the call stack and a mode for explaining the concepts of references and heap.
Thonny 3.3.3 (2021-01-21) was the first version to support the Raspberry Pi Pico. There have also been several enhancements since that release. For a release history see the Thonny Release History. We suggest checking this link monthly for updates.
Installing Thonny
The best way to install Thonny is to go to the Thonny web site and look for the "Download" for your opeating system. That link is here:
Make sure you upgrade to the latest version of Thonny if you already have Thonny installed on your computer.
You can find more tips on getting started with Thonny on the Raspberry Pi website:
https://projects.raspberrypi.org/en/projects/getting-started-with-the-pico/2
Working with MicroPython on the Raspberry Pi Pico
Once Thonny is successfully installed, make sure to change the interpreter that Thonny runs to MicroPython for the Raspberry Pi Pico. This is done by changing the selected interpreter on the bottom right of the Thonny screen.
Thonny runs on Mac, Windows and Linux.
Installing MicroPython
-
Hold down the boot button on the board (white button)
-
Plug one end of the USB cable into the board and the other end into your computer
-
The Pico should show up as a new drive (labeled RPI-RP2) available on your computer
-
Thonny will install the latest version of MicroPython for you
Running help()
You can enter the help() function in the main script area and then press the Play button. This will tell you
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 |
|
Save Options
You can save a python file in Thonny to either the Pico or to your local computer's file system.
first stop execution of any program you are running.
Version
After you press play the following will appear in the console.
1 2 3 |
|
Background on Thonny
MicroPython was originally developed by Damien George and first released in 2014. However, MicroPython did not have a development environment that was easy for students to use. Thonny was developed to provide an easy to use tool just for MicroPython development. Thonney was created at the University of Tartu Institute of Computer Science in Estonia for this purpose. They continue to support Thonny.
Several feature for Thonny were sponsored by the Raspberry Pi Foundation and we continue to see a close relationship between the Raspberry Pi Foundation and the Thonny development team.