0

$USD

$USD
TUTORIALS ESP32MicroPython

ESP32 MicroPython Tutorial: Getting started with the uPyCraft IDE

DFRobot Aug 29 2017 2656

The objective of this MicroPython Tutorial is to explain how to get started with uPyCraft, a MicroPython IDE that supports the ESP32.

Introduction

The objective of this post is to explain how to get started with uPyCraft, a MicroPython IDE that supports the ESP32.

An IDE (Integrated Development Environment) is a software that typically integrates a set of tools to make the process of code development easier. On such example is the famous Arduino Development Environment, that is extensively used by the maker community.

The uPyCraft is a very simple IDE for MicroPython development on the ESP32 and the ESP8266. The interface is minimalist and it is pretty straightforward to start working with it, as we will see during this tutorial.

So, our objective for this tutorial is to connect to a board running MicroPython and send a simple “Hello World” command in the environment prompt.

You can find the uPyCraft installation link here. You just need to download and run the executable file. During the installation procedure, it may ask you to install the Monaco font, which is needed for the IDE [1].

Note that upon a successful installation, you may be asked to update the version of the IDE. In my case I installed version 0.20, but then updated to version 0.21.

You can find the GitHub page of the project here, which also has the executable files available..

Note that uPyCraft is from DFRobot, the company that makes products such as the ESP32 FireBeetle board, the ESP-WROOM-32 module or the ESP8266 WiFi Bee board.

Testing the IDE

After a successful installation of the uPyCraft IDE, just run it. After connecting your board, click on Tools -> Serial and select the COM port of your ESP32 board, as shown in figure 1.

If you don’t know what is the COM port of your ESP32, just go to this menu entry with the board disconnected and check the available ports, then connect the board and go to the menu again. The new entry that appears should correspond to your device.

Figure 1 – Selecting the COM port of the ESP32.
Upon selecting this, a popup window like the one shown in figure 2 should appear. In the board dropdown, select ESP32. Assuming that you haven’t flashed the MicroPython firmware to the board before, choose yes on the erase_flash dropdown.
Figure 2 – Burn firmware popup.

Upon clicking the “ok” button, the firmware burn procedure should start. This is accompanied by a window that shows the progress, as illustrated in figure 3.
Figure 3 – Burning firmware progress.

After the burning procedure is finished, just click on the button highlighted in figure 4 to establish the connection to the board.
Figure 4 – Connecting to the board running the MicroPython firmware.

Upon a successful connection, the icon should change to the format indicated in figure 5.

Figure 5 – Successful connection to the ESP32 board.

Note also that at the bottom of the window a command prompt will be available. There, just introduce the python command bellow and hit enter:

1 print("Hello World from uPyCraft")

After sending the command, you should get an output similar to the one shown in figure 6, where the result of the command execution is printed on the prompt.

Figure 6 – Successful execution of the MicroPython command on the uPyCraft prompt.
To disconnect from the board prompt, just click the same button clicked before for establishing the connection. It should end the connection and the prompt should no longer be available.

Final notes

As can be seen from this tutorial, getting started with the uPyCraft is pretty straightforward.

A very positive aspect is that the IDE takes care of flashing the MicroPython firmware on the ESP32 board for us. Otherwise, we would need to download it and burn it using the esptool. Although as can be seen in this tutorial the procedure is relatively simple, it is much more convenient to have it integrated in the development environment, specially for users that are getting started and don’t feel comfortable yet to use lower level tools such as the esptool.

Other characteristic that can be noted is the simplicity of the procedures and interfaces. In a certain sense, it has a philosophy similar to the Arduino IDE, which allow us to do simple things really fast, without the need to learn how to work with a set of complicated menus.

Nonetheless, since it is a relatively recent software, there is not yet extensive documentation available. Hopefully with time it starts having a better adoption and more support from the community.


NOTE: This article is written by Nuno Santos who is an kindly Electronics and Computers Engineer. live in Lisbon, Portugal. you could check the original article here.
He had written many useful tutorials and projects about ESP32, ESP8266, If you are interested, you could check his blog to know more.

DFRobot supply lots of esp32 arduino tutorials and esp32 projects for makers to learn.