Esp32

Can I Use ESP32 Without Arduino IDE?

Arduino IDE stands for Arduino Integrated Development Environment. It is an open-source software on which a user can create and upload code to microcontrollers used in Arduino Board. This software supports multiple Arduino Boards and Ports. Different microcontrollers are programmed through Arduino IDE, such as ESP8266 and ESP32. However, ESP32 can also be programmed without an Arduino IDE. This article will explain other ways of programming ESP32.

Programming ESP32

There are two steps to program ESP32. Firstly, you need to write code for what you want to perform. And secondly, you need to transfer that code to ESP32.

Alternatives to Arduino IDE for Programming ESP32

There are three major alternatives to Arduino IDE for Programming ESP32. They are listed below

ESP32 Programming in Thonny IDE

To program ESP32 using Thonny IDE. Click on the link mentioned below. First download Thonny IDE from the link [Thonny IDE Official Site] and then install it on your PC.

MicroPython is used to program ESP32 because it is Python for microcontrollers. ESP32 does not have MicroPython by default. So, we have to flash MicroPython firmware to ESP32. You can download and install the latest release of MicroPython Firmware.

Next, you will have to flash the firmware into ESP32 using Thonny IDE. For that, below is given a detailed guide to flash MicroPython firmware on the ESP32 board.

How to Flash MicroPython Firmware?

After installing firmware in ESP32, simply write your MicroPython script in the editor of Thonny IDE. Once it is completed, save it, and then click on Run or press F5.

ESP32 Programming in VS Code

The VS Code is used to program ESP32 when there are lengthy codes or advanced projects. Firstly, you need to install Visual Studio Code (VS Code). The VS Code also works with MicroPython. Therefore, MicroPython firmware needs to be flashed in ESP32 following the same procedure as mentioned in the previous heading.

Next, download the Visual Studio Code.

A Node.js extension is required in addition to VS Code to use it on Windows.

Now you can write your MicroPython code in VS Code and run it in ESP32.

There is another extension known as Pymakr, written in JavaScript, that can be used to program ESP32. Click here to learn how to download, install, and use the Pymakr extension

ESP32 Programming in ESP-IDF

ESP32 can be programmed in the IDE provided by its developer, Espressif. The IoT Development Framework known as ESP-IDF is the official framework of Espressif which generally uses C language and also supports C++.

To program the ESP32 board first, install ESP-IDF, and then you only need to write your code in C or C++ according to the function you want to perform. When you have formulated your code, you can easily transfer your code to ESP32 using the ESP-IDF platform.

To upload code, you need to write the following command at the serial terminal of ESP-IDF.

idf.py –p COMX flash monitor

You need to replace X with the exact COM port at which ESP32 is attached to your laptop or PC.

  • To learn more about programming ESP32 in C or C++ click here.
  • To learn more about the working of ESP-IDF click here.

Conclusion

We have studied that ESP32 can be used without an Arduino IDE. There are many other platforms and programming languages available to program and run codes in microcontrollers. For instance, C, C++, and Python can be used and platforms like Thonny IDE, VS Code, and ESP-IDF can offer alternatives to Arduino IDE.

About the author

Kashif

I am an Electrical Engineer. I love to write about electronics. I am passionate about writing and sharing new ideas related to emerging technologies in the field of electronics.