Getting Started: ESP32
ESP32 (Type C)
Specifications
- Supported interfaces: UART, SPI, SDIO, 12C, PWM, 12S, IR, ADC, DAC
- On chip sensors: hall sensors, temperature sensors, capacitive touch sensors
- Serial port speed: default 115200bps
- Spectrum range: 2412 ~ 2484MHz
- Dual-Core Processor: Dual-core 32-bit Xtensa LX6 CPU
- High Clock Speed: Operates up to 240 MHz
- Memory: 4 MB Flash, 520 KB SRAM
- Wide Operating Temperature: -40°C to +85°C
Features
- Integrated WiFi: Supports 802.11 b/g/n for wireless connectivity
- Bluetooth Connectivity: Includes Bluetooth Classic and BLE for versatile communication
- CP2102 USB Interface: Enables easy USB-to-Serial communication and programming
Driver Installation
Step 1: Download the CP210x USB-to-UART Driver
- Visit the official Silicon Labs website:
- Go to the Silicon Labs CP210x driver download page:
https://www.silabs.com/developer-tools/usb-to-uart-bridge-vcp-drivers?tab=downloads - Download the correct driver for your operating system:
- The website offers drivers for Windows, macOS, and Linux.
- For Linux, most distributions already include the CP210x drivers, but you can manually install them if needed.
Step 2: Install the driver
Windows
1. Once the CP210x Universal Windows Drivers have been downloaded, right-click the file and extract the installation contents.
2. Navigate to the extracted folder and double-click CP210xVCPInstaller_x64.exe to begin the installation.
3. Follow the on-screen instructions in the installation wizard, click "Next", and accept the terms of use to finalize the installation.
MacOS
1. Once the Mac OSX VCP Driver has been downloaded, extract the installation files.
2. Go to the extracted folder and double-click SiLabsUSBDriverDisk.dmg to initiate the installation.
3. Open the Install CP210x VCP Driver file.
4. Click the "Open" button.
5. Follow the on-screen instructions in the installation wizard and complete the setup process.
Step 3: Verify Driver Installation
Windows
1. Press Windows + X and select Device Manager
2. With your ESP32 board connected to your Windows PC via a USB cable, check the "Ports" section. You should see "Silicon Labs CP210x USB to UART Bridge (COM1)" or a similar entry with a different COM port number.
3. In Arduino IDE, choose the corresponding COMX port for your ESP32 board, as previously shown in the Device Manager.
MacOS
1. In Arduino IDE, select the USB port for your ESP32 board. In our case, it appears as /dev/cu.SLAB_USBtoUART Serial Port (USB).
Test ESP32 in Arduino IDE (Blink LED)
Step 1: Open Arduino IDE
1. Launch Arduino IDE.
2. Click the Board Manager that is found in the left side panel and search esp32 by Espressif Systems then install.
3. Go to Tools → Board → esp32 → ESP32 Dev Module.
4. Navigate to Tools → Port and choose the correct COM port.
Step 2: Open a Blank Sketch
1. Click File → Examples → Basics → BareMinimum
2. Alternatively, create a new sketch and paste the following code:
#define LED_BUILTIN 2 // Built-in LED on ESP32
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Set LED pin as output
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // Turn LED ON
delay(1000); // Wait 1 second
digitalWrite(LED_BUILTIN, LOW); // Turn LED OFF
delay(1000); // Wait 1 second
}
|
Step 3: Upload the Code
1. Click the Upload button (→) in Arduino IDE.
2. As soon as text appears in the Output panel, quickly press the IO0/BOOT button to enter bootloader mode.
3. Wait for the "Done uploading" message in the status bar.
4. The onboard LED should be blinking.