Getting Started with ESP32 on Arduino IDE: A Step-by-Step Guide to Setup and Configuration

 In this blog post, we will dive into the world of ESP32 development using the popular Arduino IDE. Whether you're a beginner or an experienced developer, this step-by-step guide will help you set up your ESP32 board, configure the Arduino IDE.

I've been using the esp32 board with Micropython, but now  I'm changing it to the Arduino is because I found that the esp32's Bluetooth classic Bluetooth cannot be used with Micropython (it has some binding issues)

The esp32 is a powerful microcontroller that's perfect for building IOT devices and if you are new to the esp32 one of the first things that you will need to start with is an Arduino IDE, I'll walk you through the process step by step

 

If you would like to watch a video tutorial of it, here you go


 STEP:1

 First we will need to install the esp32 board definitions in the Arduino IDE. 

for that we will go to the preferences menu and entering a URL - 

https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json 

in the additional boards manager URLs field

STEP:2

Then we will use the board manager to search for and install esp32 board definitions


STEP: 3

Next we will need to select the correct board in the Arduino IDE mine is the DOIT ESP32 DEVKIT V1 going to the tools menu and selecting the board and Port from the drop down menu


  Testing The Setup

Now we will test the setup by uploading a simple program to the esp32. We will use the Classic Blink example program which will blink an LED on the esp32 board. You may need to rewrite the code little as the built-in LED is actually on the gpio2 of the esp32 (while in the arduino it is gpio 13)


Change the LED_BUILTIN to 2  

 

Some Troubleshooting tips

when I first uploaded the program it didn't work right away, I had an error like ModuleNotFoundError: No module named 'serial'. So mainly we will go over some common issues you might encounter when setting up the esp32 on the Arduino IDE and how to troubleshoot them.

As I already mentioned I had the problem the "serial thing" 

It is Because the pyserial is not installed in Python 3 by default. so you just type and enter this to your terminal

sudo apt install python3-pip
pip3 install pyserial

 

It is also better to use this (https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json ) URL in the additional boards manager than other URLs you may see when searching the web because another one I tried had some problems in its files, so it's better to use this one.

Or you may encounter this issue:

avrdude: ser_open(): can't open device "/dev/xxx": Permission denied

you can solve this by adding permission to your user:


sudo usermod -a -G dialout <username>
sudo chmod a+rw /dev/xxx 


Conclusion

Congratulations! You have successfully set up your ESP32 development board on the Arduino IDE. This blog post, accompanied by the informative video, has provided you with the necessary steps to get started with ESP32 programming. As you continue your journey, remember to explore additional resources, experiment with different projects, and join the thriving ESP32 community for support and inspiration.

Now, armed with this knowledge, go forth and unleash the full potential of the ESP32 microcontroller in your own exciting projects!



Comments

Popular posts from this blog

Create stunning light effects

Real-Life Dino Jump: Bringing the chrome Dino game to Life!

Seeeduino xiao esp32s3 sense Review