Programming "Blinking LED" on an ESP32 board using the Arduino IDE

Hello there!
This article is a tutorial of using an ESP32 with the Arduino IDE to develop programs. This example shows the simplest thing you can do with any kind of Development Board to see physical output through the on-board LED.


STEP 1: Required Hardware

1. Development Board 
I am going to be using the ESP32 devkit V1, but any other Development Board is fine to use.



2. Laptop / Desktop PC
as a power source and to develop the code that will be uploaded to the board.

3. Micro USB cable
Common Development Boards use a micro USB cable to connect to code and/or power source.

STEP 2: Required Software

1. Install Arduino IDE, you can easily get it under this link: https://www.arduino.cc/en/main/software


2. Install the correct Board you are using in the Arduino Software in the Tools Menu Bar by copying this url into the Additional Boards Manager URLs bar in Preferences first: https://dl.espressif.com/dl/package_esp32_index.json, if you are using a Arduino Board this is unnecessary.



3. Find Boards Manager under Tools > Boards and choose the Board you are using. In my case, using the ESP32 I go to Boards Manager and install the esp32 module


Afterward, I will be able to choose the board I use.



4. Install a USB to UART Port Driver, this is the one I am using
https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers


After installing this driver, I can choose the USB to UART Port under Tools > Port:, if you are using a Desktop PC then it might come out under the name COM(Number) like so:



STEP 3: Code and Compile

Under the Menu Bar, click on File > Examples > Basics > Blink. The following code would then appear on a new Arduino Window.



Click on the checklist icon to compile the code.




STEP 4: Connect Board to Laptop

Use your USB cable to connect the ESP32 to your laptop. A red LED should light up signing your Board is powered and ready to use.





STEP 5: Upload final Code

By clicking the arrow pointing rights upload the program to your Development Board using the USB to UART port in the Tools Menu Bar.


If you are having trouble uploading the Code, try to press the Boot button when the Software shows a "Connecting" message.

STEP 6: Observe and Explore

After Arduino IDE is done uploading your program, the blue Built_in LED on your Development Board will light up simultaneously in an interval of 1000 ms.


And that's it!

Comments

Popular posts from this blog

Plotting Real Time Sensor Readings on Web Servers using ESP32 and Arduino IDE

Inserting Data from an ESP32 to a MySQL database using PHP and Arduino IDE

Receiving Data on ESP32 from a HTML form of its Web Server using Arduino IDE