This is a test project to show that the ESP8266 board I acquired works as intended. To complete this project, I went through a number trials attempting to flash the LED on the RTC.
On the left is an image of the board I will be using to show where the on-board LED is located, and the assorted I/O ports
Also displayed is the USB to TTL driver: Important to Note for later
To start this project, I looked at the data sheet for the ESP8266 nodeMCUv2 and reviewed where the LED was. I connected the board to my computer and opened up VSCode to see if it would show any serial ports.
Steps and Description: 🪜
- Download ESP-IDF: I downloaded the ESP-IDF extension through VSCode for projects relating to ESP boards but realized this extension only applies to newer ESP32 boards.
Note
Decided to keep as I also acquired an ESP32 board for future projects
- Download PlatformIO: After reading up on which IDE extension to use for my current board, I downloaded the PlatformIO extension in VSCode to set up my project
- I selected the example blinky project from the PIO HOME 👽 and configured my environment to include the current board.
- When I compiled the project, I received a compilation error stating that the included libraries were not recognized
Note
For future references, I will compile from the PlatformIO activity bar for ease of access
-
I was able to bypass the compilation error and successfully build my project, until I ran into another error... 🤦♀️
Yes...My USB driver was not compatible for my device. So to make sure I got the right one, I went to my device manager and viewed the version number for my device which was CP210x USB to UART Bridge Controller Driver, a universal Windows Drvier.
Tip
Make sure your USB driver is recognizable and up-to-date
- After successfully installing the driver, my serial port was recognized as COM3, from here I could now build and upload my project onto the board. 😄
From this point, the project was working great, but I wanted to understand how the rate at which the on-board LED was blinking
gpio16_output_conf();
while(true) {
gpio16_output_set(0);
vTaskDelay(2000/portTICK_RATE_MS);
gpio16_output_set(1);
vTaskDelay(2000/portTICK_RATE_MS);
}Within this code snippet I manipulated the portTICK_RATE_MS from 1000 to 2000 to slow down the rate of blinking to 2 seconds in my forever loop.