Part 1: Installing Thonny IDE
VS Code IDE is suggested for developement and testing but Thonny is an alternative. You can find VS Code installation tutorial (here). This tutorial is based on this tutorial.
In this tutorial, we walk you through the basic installation of the development environment, if you choose to use Thonny as your development IDE, you should follow this tutorial.
We'll continuously update this walkthrough. Is there anything that needs to be clarified, or have you experienced some issues? Please add a comment. You do this by highlighting the text and then you can write a comment on the highlighted part. You need to log in/create an account on HackMD first.
0. Prerequisites
To finish this tutorial you need:
- Your computer (Windows, Linux, or Mac)
- Internet connection
Depending on your operating system follow one of the following sections.
Windows OS
Follow these steps:
You should follow the next tutorial (here) to update your device firmware before continue with the next step.
- Step 2: Open Thonny (first time you open Thonny you should see somthing similar to the following figure).
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 3: Click on
View >> Files
to open the file manager panel.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 4: Open interpreter selection from
Run >> Configure interpreter...
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 5: Choose your Raspberry Pi Pico similar to the numbered steps in the following figure.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 6: You should see you board REPL (Read-Eval-Print Loop). You can enter
print('LNU Tutorial')
and you see your board prints it to the serial port like the following image.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
You are now ready to move to the next tutorial (here) to get familiar with terms and project structure.
Mac OS
Follow these steps:
You should follow the next tutorial (here) to update your device firmware before continuing with the next step.
- Step 2: Open Thonny (first time you open Thonny you should see somthing similar to the following figure).
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 3: Click on
View >> Files
to open the file manager panel.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 4: Open interpreter selection from
Run >> Configure interpreter...
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 5: Choose your Raspberry Pi Pico similar to the numbered steps in the following figure.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
- Step 6: You should see you board REPL (Read-Eval-Print Loop). You can enter
print('LNU Tutorial')
and you see your board prints it to the serial port like the following image.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
You are now ready to move to the next tutorial (here) to get familiar with terms and project structure.
Linux OS (Ubuntu / Fedora)
Follow these steps:
-
Step 1: Download the Thonny installation script (To get the latest version)
-
Step 2: Install Thonny
To install Thonny, upen up a Terminal
and go to the folder where the Thonny file is located, which is usually Downloads/
.
This tutorial is based on Thonny 4.0.2, so if you install another version of Thonny, be sure to adjust the name of the .bash
script file in the commands below.
To run the .bash
script, you must give the file execution permission:
Finally, run the .bash
script to install Thonny:
-
Step 3: Open Thonny
You should follow the next tutorial (here) to update your device firmware before continuing with the next step.
Before opening Thonny, you must change the access permissions for the Pico. You can do this by connecting the Pico to the computer and open up a Terminal
and execute this command: sudo chown <USERNAME> /dev/ttyACM0
, where <USERNAME>
should be your own user name. This must be done every time you connect the Pico to the computer.
Give access permissions to the Pico with the following command:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
Open Thonny:
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
Step 4: Click on View >> Files
to open the file manager panel.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
Step 5: Go to Run >>> Configure interpreter
to select your Pico.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
Step 6: Select your Pico by following the numbered steps:
The Pico port is usually /dev/ttyACM0
on Linux, but it can vary.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
-
Step 6: Now you should see the REPL (Read-Eval-Print Loop) in Thonny. Try to print something to make sure it works.
Image Not Showing
Possible Reasons
- The image was uploaded to a note which you don't have access to
- The note which the image was originally uploaded to has been deleted
Learn More →
You are now ready to move to the next tutorial (here) to get familiar with terms and project structure.