Getting Started With ESP32
by Nick Programmer in Circuits > Microcontrollers
1289 Views, 11 Favorites, 0 Comments
Getting Started With ESP32
The ESP32 is a series of low-cost and low-power System on a Chip (SoC) microcontrollers developed by Espressif that include Wi-Fi and Bluetooth wireless capabilities and dual-core processor. This guide contains all the information you need to get started with the ESP32. But it's not matter, it's better to know - why ESP32?
Why ESP32?
- The ESP32 costs a little bigger than ESP8266;
- The ESP32 has a bigger power than ESP8266;
- The ESP32 has Bluetooth module;
My tutorial on YouTube - https://youtu.be/18oxkQJgAtI
Supplies
If you don't have ESP32 board, you will need to have..
- ESP32 x1;
- USB Cable x1;
- CP2102 USB UART x1;
If you have ESP32 board, you will need to have..
- ESP32 x1;
- USB Cable x1;
Download the Arduino IDE
IDE - Integrated development environment, or an application, that we will use to write code and upload code.
I don't recommend you to download the Arduino IDE 2.x versions. There are still some bugs and some features that are not supported yet for the ESP32. I recommend to download the 1.8.19 version of Arduino IDE because it works properly with ESP32.
- To see the Arduino IDE page click - here.
- Scroll down and find the 1.8.19 version.
- Select your operating system and download.
Install the Arduino IDE
After downloading you will need to go to the Download folder, find the Arduino file .exe, then you will need to install the .exe file.
Configure the Arduino IDE
- Open the Arduino IDE.
- Navigate to the File > Preferences, paste the "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json" link into the Additional Boards Manager URLs text field.
- Navigate to the Tools > Board > Boards Manager, find the esp32 and click install.
- Then you'll need to go to the Tools > Boards, and choose your esp32 board.
Download and Install Driver CP210x for ESP32
- Then you will need go to the page with CP210x Driver.
- Page with CP210x Driver for ESP32 - here.
- Scroll down until you find the CP210x "VCP Mac OSX Driver" - for MacOS or CP210x "Windows Drivers" - for Windows.
- Download;
- After downloading you will need to go to the Download folder;
- Find CP210x driver .zip;
- Unpack the .zip file, go to the unpacked folder and Install the x86 driver .exe.
Upload an Example
#include "WiFi.h"
const char* ssid = "yourNetworkName"; //choose your wireless ssid
const char* password = "yourNetworkPass"; //put your wireless password here.
void setup() {
Serial.begin(115200);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.println("Connecting to WiFi..");
}
Serial.println("Connected to the WiFi network");
Serial.println("IP address: ");
Serial.println(WiFi.localIP()); //show ip address when connected on serial monitor.
}
void loop() {}
- Create a new Sketch;
- Change the SSID and Password in the sketch;
- Navigate to Tools > Board: > ESP32 Arduino > 'select you board'
- Click the upload button;
- When you see "Connecting.." message, hold BOOT button on your board until your Sketch will be uploaded;
- Check the Serial Monitor;
If you saw connected message, everything worked properly.
Congratulations 👏