Firmware Setup¶
Setting up Arduino IDE for ESP32 development.
Install Arduino IDE¶
Download¶
- Website: arduino.cc/en/software
- Version: 2.0 or later recommended
- Platforms: Windows, macOS, Linux
Installation¶
- Download installer for your OS
- Run installer and follow prompts
- Launch Arduino IDE
Add ESP32 Board Support¶
Step 1: Add Board Manager URL¶
- Open Arduino IDE
- Go to File > Preferences (or Arduino > Preferences on macOS)
- Find "Additional Boards Manager URLs" field
- Add this URL:
- Click OK
Step 2: Install ESP32 Package¶
- Go to Tools > Board > Boards Manager
- Search for "ESP32"
- Find "ESP32 by Espressif Systems"
- Click Install
- Wait for installation to complete
Configure Board Settings¶
Select Board¶
- Go to Tools > Board > ESP32 Arduino
- Select ESP32 Dev Module
Alternative options: - ESP32 Wrover Module - ESP32S2 Dev Module - NodeMCU-32S
Port Selection¶
- Connect ESP32 via USB
- Install drivers if needed (see below)
- Go to Tools > Port
- Select the COM port (Windows) or /dev/ttyUSB0 (Linux)
Upload Settings¶
Configure these settings for optimal performance:
| Setting | Recommended Value | Description |
|---|---|---|
| Upload Speed | 921600 | Maximum upload speed |
| CPU Frequency | 240MHz | Maximum performance |
| Flash Frequency | 80MHz | Fast flash access |
| Flash Mode | QIO | Quad I/O mode |
| Flash Size | 4MB | Standard flash |
| Partition Scheme | Default 4MB | Standard partition |
Install USB Drivers¶
Windows¶
CP210x (Silicon Labs)¶
- Download from Silicon Labs
- Run installer
- Restart if prompted
CH340¶
- Usually auto-installs
- If not, download from manufacturer website
macOS¶
- Drivers usually not required for macOS 10.15+
- May need to approve in System Preferences > Security & Privacy
Linux¶
Add user to dialout group:
Log out and back in for changes to take effect.
Test Upload¶
Blink Sketch¶
- Open example: File > Examples > 01.Basics > Blink
- Modify LED pin (ESP32 uses GPIO2 for built-in LED):
- Click Upload button (→)
- Wait for "Done uploading" message
Serial Monitor Test¶
- Open Tools > Serial Monitor
- Set baud rate to 115200
- Press Reset button on ESP32
- Should see boot messages:
Troubleshooting¶
Upload Failed¶
| Error | Solution |
|---|---|
| "Failed to connect" | Hold BOOT button, press RESET, release BOOT |
| "Wrong boot mode" | GPIO0 must be LOW during upload |
| "A fatal error occurred" | Check USB cable, try different port |
| "Permission denied" | Check drivers (Linux: add to dialout group) |
Port Not Found¶
- Check USB cable (must be data cable, not charge-only)
- Try different USB port
- Install/update drivers
- Restart computer
Compilation Errors¶
- Update ESP32 board package
- Check library compatibility
- Verify correct board selected
Arduino IDE 2.x Features¶
Useful Features¶
- Serial Monitor: Built-in with timestamp option
- Board Manager: Easier library management
- Debugger: Advanced debugging (select boards)
- Auto-complete: Code suggestions
Recommended Settings¶
File > Preferences: - Show verbose output during: ☐ compilation ☐ upload - Editor language: English - Editor font size: 12 - Interface scale: Auto
Next Steps¶
- Install required libraries
- Upload test code
- Proceed to hardware setup