Programming the ESP32: The different platforms and languages
For beginners, the most common and easiest way to program the ESP32 is to use the Arduino IDE software . Although it is intended for Arduino boards, we can use it to program other types of boards, thanks to the additional board manager.
For more advanced users, I recommend using VS Code with PlateformIO to use the ESP32 features fully. It’s a “game-changer”, especially when you realize Wi-Fi/Web-oriented projects where you mix several languages (C, HTML, CSS, Javascript). You can even program the ESP32 in pure C without using any Arduino code with only the ESP-IDF framework.
There is also an increasingly popular alternative, especially since the release of the Raspberry Pi Pico:MicroPython . It is, in fact, possible to program the ESP32 in Python. This port of the Python language on a microcontroller (hence the name Micro Python) allows you to benefit from all the advantages of Python with, of course, less good performances than with Arduino code. To mention only one of these qualities, the uploading and execution a new program are almost instantaneous. At the same time, it takes up to several minutes with Arduino code for the compilation and uploading of the program to be finished. It makes all the difference when you are a beginner and can test your code regularly.
Apart from the choice of programming language, since it is an electronic board, it is essential to know how the pins work.
ESP32 Pinout: Understanding the ESP32 pins
The pins of the ESP32 have many more features than those of the Arduino boards. However, unlike Arduinos, the pin positions differ depending on the model. Fortunately, even if the pins on your ESP32 board are positioned in one place, they still function in the same manner.
On the detailed pinout diagrams (ESP32 Pinout), the pin functions indicated are the default ones. On the ESP32, we can choose the pins that will use the SPI, I2C, UART, I2S, and DAC peripherals. I strongly invite you to consult the tutorial on the detailed operation of each pin of the ESP32 (ESP32 Pinout) for more details and to become knowledgeable about the ESP32 pins.
In most of our ESP32 projects, we use the ESP32 DEVKIT DOIT board, and that's the one we recommend for beginners. There are different versions of this board with a different number of available pins (30, 36, and 38)—all boards work in a similar way. Where to Buy?
Software Capabilities and Programming: ESP32 vs Arduino
Programming the ESP32 may require a steeper learning curve compared to Arduino but offers greater control and efficiency, especially for complex applications.
Your ESP32 can easily be programmed in C or C++ using the Arduino IDE, and there are specific steps to do this. However, you may find that the Arduino IDE doesn't offer a lot of options such as debugging, autocomplete, and function navigation features, among others.
To start using ESP-IDF on ESP32, install the following software: Toolchain to compile code for ESP32. Build tools - CMake and Ninja to build a full Application for ESP32. ESP-IDF that essentially contains API (software libraries and source code) for ESP32 and scripts to operate the Toolchain.
The Raspberry Pi & the ESP32 boards are the two most important and popular platforms used mainly for electronic & programming projects. As compared to ESP32, Raspberry Pi is a better choice when the user needs microcontroller boards based on their specifications.
ESP32 development board is appropriate for advanced projects that need higher processing capabilities & connectivity like; smart home applications, industrial automation & IoT devices. Arduino board's simplicity will make it to use for educational purposes, hobbyist projects & art installations.
This is one of my favorite ESP32 development boards, if you could only have one board, this is the one I would recommend. The reason I like this board so much is that it makes all the I/O pins and features of the ESP32-S3 available through its 44 pins.
ESP32 can perform as a complete standalone system or as a slave device to a host MCU, reducing communication stack overhead on the main application processor. ESP32 can interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI / SDIO or I2C / UART interfaces.
However, the ESP32 has a relatively high power consumption, which can be a disadvantage for battery-operated IoT applications . It is also important to consider the impact of peripheral components, such as voltage regulators, on power consumption .
It includes Bluetooth, more memory, processing speed, dual core and a lot of peripherals (Touch, CAN, SDIO, I2S). Thanks to these features, the ESP32 is being used in several areas: IoT Devices: The ESP32 is often used to build IoT devices due to its built-in Wi-Fi and Bluetooth capabilities.
When using a single power supply, the recommended power supply voltage is 3.3 V and the output current is no less than 500 mA. It is suggested to add an ESD protection diode at the power entrance.
Connect the ESP32 board to the PC using the USB cable. If device driver does not install automatically, identify USB-to-UART bridge on your ESP32 board (or external converter dongle), search for drivers in internet and install them.
ESP32 can be powered using Micro USB port and VIN pin (from external supply). The power requirement of ESP32 is 600mA of that ESP32 pulls only 250mA during the RF transmissions. When it is performing boot or wifi operation it's drawing more than 200mA current.
To program or exchange information between your computer and an ESP32/ESP8266 chip, you need to install the CP210x USB to UART Bridge Virtual COM Port drivers. This guide shows to install the drivers in a Windows PC.
Introduction: My name is Melvina Ondricka, I am a helpful, fancy, friendly, innocent, outstanding, courageous, thoughtful person who loves writing and wants to share my knowledge and understanding with you.
We notice you're using an ad blocker
Without advertising income, we can't keep making this site awesome for you.