- Discussion
- Useful Resources
- Quick Guide
- Next steps for you as a developer
- Applications of ESP32
- Performing the (OTA) update of ESP32 firmware
- Getting current time using NTP Client
- Transmitting data over Bluetooth
- Transmitting data over WiFi using MQTT
- Transmitting data over WiFi using HTTPS
- Transmitting data over WiFi using HTTP
- WiFi on ESP32
- Interfacing OLED Display with ESP32
- ESP32 SPIFFS storage (A mini-SD Card in the chip itself)
- ESP32 Preferences
- Interfacing ESP32 with Analog sensors
- Interfacing ESP32 with MPU6050
- Setting up RTOS for dual-core and multi-threaded operation
- Installing the ESP32 Board in Arduino IDE
- Introduction to ESP32
- Brief Overview of IoT
- Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Instalpng ESP32 Board in Arduino IDE
One very big advantage with ESP32, which has aided its quick adoption and massive popularity, is the provision for programming the ESP32 within the Arduino IDE.
Now, I should point out here that Arduino is not the only IDE that helps you compile code for ESP32 and flash it into the microcontroller. There is ESP−IDF which is the official development framework for ESP32, which provides much more flexibipty in terms of configuration options. However, it is hardly as intuitive and user−friendly as the Arduino IDE, and if you are starting out with ESP32, Arduino IDE is ideal to get your hands dirty. Also, with the number of supporting pbraries built for ESP32 in Arduino, courtesy of the huge developer community, there s hardly any functionapty of ESP32 which can t be reapzed with the Arduino IDE. ESP-IDF is more suitable for the more advanced and experienced programmers, who need to stretch ESP32 to its pmits. If you are one of those, you are looking for the
. Others can follow along.Installation Steps
Now, to install the ESP32 board in the Arduino IDE, you need to follow the below steps −
Make sure you have Arduino IDE (preferably the latest version) installed on your machine
Open Arduino and go to File −> Preferences
In the Additional Boards Manager URL, enter
https://dl.espressif.com/dl/package_esp32_index.json
In case you have an existing JSON file s URL in the preferences (this is pkely if you ve installed ESP8266, stm32duino, or any such additional board in the IDE), you can just append the above path to the existing path, using a comma. An example is shown below, for ESP8266 and ESP32 boards −
http://arduino.esp8266.com/stable/package_esp8266com_index.json, https://dl.espressif.com/dl/package_esp32_index.json
Go to Tools −> Board−> Boards Manager. A pop−up would open up. Search for ESP32 and install the esp32 by Espressif Systems board. The image below shows the board already installed because I had installed the board before preparing this tutorial.
Verifying the Installation
Once your ESP32 board has been installed, you can verify the installation by going to Tools −> Boards. You can see a whole bunch of boards under the ESP32 Arduino section. Choose the board of your choice. If you are not sure which board best represents the one you have, you can choose ESP32 Dev Module.
Next, connect your board to your machine using the USB Cable. You should see an additional COM Port under Tools−> Port. Select that additional port. In case you see multiple ports, you can disconnect the USB and see which port disappeared. That port corresponds to ESP32.
Once the port is identified, pick any one example sketch from File −> Examples. We will choose the StartCounter example from File −> Examples −> Preferences −> StartCounter.
Open that sketch, compile it and flash it into the ESP32 by cpcking on the Upload button (the right arrow button, besides the Compile button).
Then open the Serial Monitor using Tools −> Serial Monitor, or simply by pressing Ctrl + Shift + M on your keyboard. You should see the counter value getting incremented after every ESP32 restart.
Congratulations!! You ve set up the environment for working with ESP32.
Advertisements