Hi! Welcome to my first blog!
I’m writing here on Medium for the very first time and yes, it is for my uni assignment.
I am currently taking Embedded System course where I basically have to do certain ESP32-related projects and write everything I have to say — the preparation, process, errors, etc — about each project.
So yeah, it seems like I will be regularly posting new articles about my progress, probably on a weekly basis since I was told to do one project each week.
Without further ado, let’s talk about my first project assignment — LED Blink
My First Project : LED Blink
In this project, we are supposed to make the built-in LED in ESP32 blink every particular time interval.
Devices needed are ESP32 with the ESP-WROOM-32 chip 30 pin, a USB-to-micro data cable, and a laptop/PC.
Preparation Steps :
- Download and install Arduino IDE on your laptop/PC. We will use this IDE as our programming environment. Visit this link : https://www.arduino.cc/en/software
2. If you are a first-timer like me, then a few configurations are needed for Arduino IDE in order for it to be able to work with ESP32. This is necessary because Arduino IDE is originally made for Arduino, not ESP32.
3. Install USB-to-UART driver. ESP32 board is equipped with USB-to-UART converter as mean of serial data communication between PC and ESP32. Visit this link : https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers
Extract the zip file we recently downloaded and install CP210xVCPInstaller_x64
4. Connect ESP32 board and Laptop using micro USB data cable. Make sure to use a proper data cable, not just charging cable to avoid data transmission failure.
5. Open Device Manager and check to make sure our USB-to-UART driver has been installed and is detectable.
6. Configure USB-to-UART port on Arduino IDE
Alright, everything’s all set. Let’s proceed to our main section of the project.
Project Steps :
- Open Blink File from Examples
Let’s take a closer look at the code. By default, delay(1000) are written in the loop part which means that the built-in ESP32 LED will blink every 1000 ms or 1 second. We can modify this part of the code with just any interval.
2. Verify the code by clicking the Check Mark button.
3. Upload program to ESP32 by clicking the right arrow button located beside the verify button.
Press and hold the Boot button on your ESP32 during the Upload process. Release after message “Done Uploading” pops up. You will encounter an error if you fail to do this.
4. Press EN button on ESP32 to reset the board and voila, the LED will constantly blink in our desired time interval. In my case, it is 1 second interval.