Connect the components as shown in the schematics below. You have seen it a countless number of times in blink projects. The schematics for using ESP32 with MicroPython for Blink an LED project is simple.
Thonny python ide software#
More on this software will be discussed later in this article. Previously we blinked ESP32 LED by programming it using Arduino IDE.Īsides the hardware components, we will also require software lik e Thonny IDE You can use any of the other ESP32 based boards in place of the DOIT ESP32 DevKit V1 and you can choose to work with the onboard LED, which means you only need the ESP32 board for this tutorial. To build the blink example, we will need the following components
With that out of the way, let's jump into building the blink example using ESP32 with MicroPython. Irrespective of which of these two you choose for your project, be sure what serves you best.
Thonny python ide code#
As such, you can test each part of your code as you develop them. This feature allows you to connect to a board and execute code quickly without the need to compile or upload the entire code. On the upside, MicroPython is essentially a lean version of python which is one of the most popular programming languages in the world and as such, any problem which can’t be solved by the MicroPython community can take up insights from the general python community.Īsides the community support, MicroPython also has certain features which put it way above the class of the Arduino. While its user's community is growing, with support for more platforms being released, its strength cannot be compared to that of the Arduino. MicroPython, on the other hand, is relatively new. With the IDE being limited and lacking some features which could really be useful when developing a large code base, the Arduino C is not the most efficient. The only real limitation one could attach to the Arduino C is the fact that it only works within the Arduino IDE. All these make it a formidable tool for programming embedded system boards. In addition to this, Arduino has one of the largest tech communities in the world with new libraries, software fixes, new board support etc.
C and C++, for decades, have been the two most popular languages for embedded systems development, and the Arduino version of the language made it even simpler which accounts for its popularity amongst makers and hobbyist due to the ease with which codes can be developed. One of the well proven, easiest ways of programming the ESP32 is by using the Arduino IDE which means the use of the Arduino version of C or C++. Why MicroPython? (MicroPython vs Arduino C) We will start by taking a look at why MicroPython is good for ESP32 and work our way through setting up the ESP32 for MicroPython and uploading the blink sketch with MicroPython on the ESP32. For today’s tutorial, we will be looking at one of such boards for whom firmware can be developed using MicroPython.įor today’s tutorial, we will look into developing the code for the ESP32 using MicroPython. While MicroPython is not yet on the same popularity level as C and C++ for embedded systems development, its popularity has been on the increase with more and more microcontrollers, IDEs and development boards supporting its use. Micro-python is specifically a lean implementation of Python 3 and as such is compatible with the syntax of python 3. They can immediately start using the knowledge they have acquired over the years to access the low-level hardware just as with the other languages. With Python now the major introductory language in most schools and with it being one of the most popular and widely used programming languages across the world, through micro-python, scores of Python users are able to circumvent the stressful steep learning curve associated with using C and C++ to program microcontrollers. It was created to enable developers to leverage the “ easy to learn and use” nature of python for embedded systems development. MicroPython is a lightweight version of the Python programming language developed for programming microcontrollers, SOCs, and other embedded system devices.