ESP Development Boards Overview
Download & Install VCP Drivers
Most of the ESP development boards require VCP Drivers to be installed on your computer, otherwise the system will not recognize that there is a microcontroller connected via USB. VCP Drivers allow device to operate as a virtual COM Port and initiate USB to UART bridge.
1. Download VCP Drivers from here.
2. Install the Driver on your computer.
3. Connect ESP8266 NodeMCU to your computer via USB. You should hear a sound indicating that a new device was connected.
4. Open the Device manager on your computer (You can start typing "Device Manager" in the search box).
5. Look for Ports (COM & LPT). You should see something like the image below:
You will need to use the number of the COM port later in this tutorial.
Note: If you don't see "Ports (COM & LPT)" or if there are no devices connected try different USB ports.
Note: Not all cables are going to work! You need a cable that supports both: charging and data transfer. It has to be relatively short (3' and under, the shorter the better).
Download & Install Arduino IDE
Arduino IDE is used to develop code for microcontrollers like ESP32 DevKitC and ESP8266 NodeMCU. You can download the latest version of Arduino IDE for Windows, Linux or MacOS X from this website. Arduino code is called Sketch.
All sketches must be compiled before they are uploaded to the microcontroller. Compilation is a process of converting the code from human-readable to machine-executable. Only after a scketch is compiled and only if there are no errors detected in the code it is possible to upload it to a microcontroller.
New - open a new sketch. Keep in mind that it is also possible to add a new sketch as a tab to the same window. It is convenient if you are testing a new version of the same code.
Open/Save - can also be done from the "File" menu, which includes a shortcut "Open Recent".
Upload - Compile and upload to a microcontroller.
Verify - Compile your code to see if there are any errors. Mostly used for troubleshooting.
Prefilled Functions - Both of these must be present in any Arduino code, otherwise it will not compile.
Status area - After you click "Verify" or "Upload" you can see updates in this section. The Example shown in the image above is a message displayed after the sketch was compiled correctly.
Serial monitor - can also be accessed from Tools --> Serial Monitor. Shows Serial output once the code is uploaded to a microcontroller. We can think of it as an equivalent to Thonny IDE shell.
Install Libraries for Arduino IDE
Just like you need libraries to code in Python you will need to install libraries while working with Sketches (which are essentially C++).
1. Open Arduino IDE and navigate to Tools → Manage Libraries.
2. Search for and install the following:
- ESP8266 by Adafruit
- ESP32 by Espressif Systems
3. In Arduino IDE and add your board. File → Preferences. Paste the following in the “Additional Boards Manager URL’s:” line*:
*Tip: If you are working with different development boards you can add several URL's to this line separating them by a comma:
4. Tools → Board → select the board you are currently working with. Be careful because there can be different versions of the same development board and if you select the wrong one you won't be able to upload your code. Arduino IDE will return an error saying that the selected board was not found. The easiest way to find the right name is to view your order (if you ordered it online), the correct name should be included in the name of the product.
5. Tools → Port → COM*. You need to select the COM port you found in the beginning of this tutorial.
Contributors and Attributions
Robert E. Belford (University of Arkansas Little Rock; Department of Chemistry). The breadth, depth and veracity of this work is the responsibility of Robert E. Belford, email@example.com. You should contact him if you have any concerns. This material has both original contributions, and content built upon prior contributions of the LibreTexts Community and other resources, including but not limited to:
- Elena Lisitsyna