Before we can start tinkering with MicroPython, we need to install the programming tools on our PC.
Unlike other languages and technologies, MicroPython does not provide us with a standard or preferred IDE (“it only gives us the language and the firmware”).
The good news is that we have several alternatives to choose an IDE. And the bad news is that none of them are particularly good 😅 (honesty above all).
Let’s take a look at some of them 👇.
Arduino Lab for MicroPython
In my opinion, the favorite option for programming in MicroPython. The Arduino Lab for MicroPython is an IDE developed by Arduino, but compatible with any device that supports MicroPython.
It’s simple, works very well, and has all the features you need (like autocompletion).
The downside is that not many people know about it. So most tutorials you see will not use it (that’s why I’m here, to recommend it).
Moreover, officially it’s an “experimental” version. That is, the future is uncertain. But it has been uncertain for years, and they haven’t removed it or anything.
You can find it available at this link Arduino Labs. It’s Open Source and the code is on GitHub
Thonny
Thonny is the most popular option for using MicroPython. In theory, it is designed to be simple and beginner-friendly.
Overall it works quite well. It has syntax highlighting, a file explorer. It works, it gets the job done.
However, it has shortcomings. It looks like it was taken straight from Windows 98 😉, and it lacks basic features in any IDE (autocompletion, or error highlighting).
But, even preferring the former, it works very well. It has been with us for many years, is stable, and a safe option. You will find many tutorials that use it (especially because they are old tutorials).
If you want to use Thonny, you can download it from the official site and install it on your operating system. It’s Open Source and its code is on GitHub.
Other options
Let’s look at other options that I do not recommend, but just so you know them (especially in case you come across them in other tutorials), I will mention them.
Visual Studio Code (VS Code) is the favorite code editor for kids and adults alike. It is highly customizable and extensible, used by professional developers around the world in all languages.
I would love to tell you that there is an official MicroPython extension for VScode… but that’s not the case. There is no official MicroPython extension for VSCode.
There are several unofficial extensions to use MicroPython in VSCode. Some of them are Pymakr and RT-Thread.
I’m sure some of them work very well, but I won’t be using them. Because they are not Open Source, they are from private manufacturers (I don’t know what they install, or how long they will work, etc.).
Still, if you want to use them, you are welcome to do so. Check the information in their respective documentation.
uPyCraft is another editor that is also highly recommended, though I personally do not recommend it (I mention it in case you hear about it elsewhere).
It is developed by DFRobot, as a simple IDE. But I don’t see any advantage compared to Arduino Lab or Thonny.
Aside from that, it has not been updated for 8 years, it has no official website, it has the binary (.exe) of the installer uploaded directly on GitHub… I don’t know, it’s all very strange.
Still, if you are interested, you can find it on github and the code in this other repo GitHub - DFRobot/uPyCraft_src (why? I have no idea, they don’t even know).