Why I Started This Project
I'm a firmware engineer looking to transition into remote IoT roles at globally distributed companies. To build a portfolio that demonstrates end-to-end IoT skills — from embedded sensors to cloud backends — I decided to start from the basics: getting an ESP32 up and running.
This is the first post in a series where I'll document building a complete IoT system with ESP32, MQTT, and Go.
What You'll Need
- ESP32 DevKit (WROOM)
- USB cable (data-capable, not charge-only)
- VS Code + PlatformIO extension
Step 1 — Install PlatformIO
- Install VS Code
- Go to Extensions, search PlatformIO IDE and install
- Restart VS Code
Step 2 — Create Your First Project
Open PlatformIO, click New Project:
- Board:
DOIT ESP32 DEVKIT V1 - Framework:
Arduino
Step 3 — Verify Your Board is Connected
This is where I got stuck the longest.
After plugging in the ESP32 via USB, I wasn't sure if my computer actually recognized it. Here's how to confirm:
On Windows:
- Open Device Manager
- Look under Ports (COM & LPT)
- You should see something like
Silicon Labs CP210xorCH340on a COM port
Once I saw COM3 appear, VS Code's PlatformIO also showed the device was ready to connect. That was my confirmation the board was properly detected.
If nothing shows up, you likely need a driver. Check which USB chip your board uses (usually CP2102 or CH340) and download the corresponding driver.
Step 4 — Write and Upload Your First Program
Paste this into src/main.cpp:
#include <Arduino.h>
void setup() {
Serial.begin(115200);
pinMode(2, OUTPUT);
}
void loop() {
Serial.println("hello from ESP32");
digitalWrite(2, HIGH);
delay(500);
digitalWrite(2, LOW);
delay(500);
}
Press → Upload in the bottom toolbar, or Ctrl+Alt+U.
Step 5 — Open Serial Monitor
Click the plug icon in the bottom toolbar to open Serial Monitor.
Important: Make sure the baud rate matches your code. Add this to platformio.ini:
monitor_speed = 115200
Without this, you'll see garbled text instead of your output — exactly what happened to me.
Result
When I finally saw hello from ESP32 printing every second, I was genuinely surprised it worked. It felt like a small but real milestone — the board was alive, the toolchain worked, and I had a foundation to build on.
What's Next
In the next post, I'll connect a BME280 sensor and publish temperature and humidity data over MQTT — the first step toward a complete IoT pipeline.
Top comments (0)