![]() Inevitably, you will encounter errors when writing code. If you have not saved the code, save the code before it can run.į: The Debug icon allows you to debug your code. Similarly, you can choose whether to save the code to your computer or to the Raspberry Pi Pico.Į: The play icon allows you to run the code. Once open the page, you will see a light gray box in the upper right corner, click on the link that applies to your operating system.Ī: The menu bar that contains the file New, Save, Edit, View, Run, Debug, etc.ī: This paper icon allows you to create a new file.Ĭ: The folder icon allows you to open files that already exist in your computer or Raspberry Pi Pico, if your Pico is already plugged into your computer.ĭ: Click on the floppy disk icon to save the code. You can download it by visiting the Thonny website. Thonny comes with Python 3.7 built in, just one simple installer is needed and you’re ready to learn programming. You may also like to check our tutorials on MicroPython with uP圜raft IDE and can also try same codes with Thonny IDE.Before you can start to program Pico with MicroPython, you need an integrated development environment (IDE), here we recommend Thonny. Thonny IDE is easy to use IDE to write MicroPython programs for ESP32 and ESP8266 and it is compatible Windows, Linux, and Mac operating systems. That means we can also directly upload files to a device. This gives two options to save this file either to your computer or directly to your devices such as ESP32 or ESP8266. When you click on the save icon (2), this pop-up window will appear. After that copy the following code in a new file and save it by clicking the save icon (2) with the name main.py. To create a new file click on the new file icon (1). For demonstration, we will perform a simple experiment of blinking onboard LED of ESP32 and ESP8266 by following all the necessary steps Create MicroPython File in Thonny IDEįirst, we need to create a main.py file that will contain our main program code which would be executed. In this section, we will see how to create a new MicroPython file and how to upload the script to ESP32/ESP8266 using Thonny IDE. Writing Your First MicroPython Script with Thonny IDE You can tick all the tabs which you want to appear on your IDE. ![]() Click on any to customize your IDE according to your needs. By clicking this, the program code halts whichever line it currently is. It allows us to go back into play mode instead of debug mode. With this button, we can exit the debugging. This arrow button (Step Out) is also used after the debug button.With this button, we take a smaller step than the previous button and work deeply. This arrow button (Step Into) is used after the debug button.With this button, we can jump from one line or one block of code to another. This arrow button (Step Over) is used after the debug button.This helps us in detecting errors whether they are syntax or logical When we click on it the code runs and is executed. By clicking on this icon we can save our code in whatever step it is. It helps us in opening a file which was already saved in our PC. By using this button, we can create several different files and work on them at once. The first icon which shows a paper is for creating a New File.Click on download version 3.3.6 for Windows. The window shown below will be displayed. You can download the latest version of the IDE. By Clicking here, you will be redirected to the official page of Thonny IDE. We will show you how to download and install Thonny in Windows operating system. Installing Thonny IDE in Windows Operating System In this section, we will list step by step instructions to download and install Thonny IDE on Windows, Linux and Mac OS based computers. In case you do not have it, you can take a look at our previous article: Getting Started with MicroPython on ESP32 and ESP8266 to see how to install it easily. Prerequisitesīefore installing Thonny IDE on your Windows, Linux and Mac based PCs make sure you have the latest version of Python3 downloaded and installed. It is available to install on r Windows, Linux, and Mac OS. You can realize the popularity of Thonny IDE from this new that it comes pre-installed in Raspian OS which is an operating system for a Raspberry Pi. With the help of Thonny, it becomes very easy to code in Micropython as it has a built-in debugger that helps to find any error in the program by debugging script line by line. It is extremely interactive and easy to learn IDE as much as it is known as the beginner friendly IDE for new programmers. Thonny is an open-source IDE which is used to write and upload MicroPython programs to different development boards such as ESP32 and ESP8266. Writing Your First MicroPython Script with Thonny IDE.Test Thonny IDE Installation with LED Blinking Example.Installing Thonny IDE in Windows Operating System.
0 Comments
Leave a Reply. |