Sefism is free for learners. We are here to help you grow, one step at a time.Join for free
Sefism.

Project structure · More

ESP32 with PlatformIO project structure

Opens with credits

Firmware for an ESP32-S3 plant monitor that reads soil moisture and temperature, publishes them over MQTT and serves a small web dashboard, built with PlatformIO and the Arduino framework. The layout follows the PlatformIO project conventions: firmware in src/, testable logic in private libraries under lib/, tests under test/ that run on your laptop and on the board, web files in data/ for LittleFS, and a custom partition table with two OTA slots. For students who have blinked an LED in the Arduino IDE and want to build firmware that survives in the field.

Curated by Tauseef FayyazIntermediate131 files and foldersPlatformIO Core 6.2, pioarduino platform-espressif32 55.03.312 (Arduino-ESP32 3.3.12 on ESP-IDF 5.5.5), ESP32-S3Checked October 2026
Explore the filesPick any file to see what it is, why it exists and when you add it.

How it grows

Each stage opens the explorer there

  1. 1Day 1What the scaffold and your first hour give you17 files and folders
  2. 2GrowingWhat a real app with features and tests adds+53 files and folders
  3. ProductionWhat running it for real users adds+31 files and foldersOpens with credits
  4. ExpertWhat a team needs to keep it healthy for years+30 files and foldersOpens with credits

How it is organised

  • platformio.ini is the single source of truth: board, platform version, libraries and build flags are pinned there, so every machine and CI builds the same firmware.
  • Pin the platform and library versions. "Latest" on the platform line means your firmware can change under you on the next clean build.
  • Keep src/ for the application and hardware glue, and move logic that does not need the ESP32 into private libraries in lib/. Those compile on your laptop, so they can be tested in a second without a board.
  • Test in two places: many fast native tests for logic, and a few on-device tests for flash, NVS and sensors. Hardware-in-the-loop comes when field bugs demand it.
  • Secrets never go in Git: secrets.h is gitignored for development, and production devices get credentials through provisioning into NVS.
  • Plan flash from the start with your own partition table: two app slots for OTA, a LittleFS partition for web files, NVS for settings, and a core dump partition.
  • Use FreeRTOS tasks and queues, not `delay()`, so slow network calls never block sensor sampling, and let a watchdog reset anything that hangs.
  • Every OTA update travels over HTTPS with a checked certificate and is confirmed only after a healthy boot, so a bad release rolls back by itself.

At the top of the project

Open one in the explorer for the full story

Learn more on Sefism

Roadmaps, cheat sheets and projects that go with ESP32 with PlatformIO.

See 8 more
Checked against 17 official sources, October 2026. If something has changed, the docs win.Show sources

Picked from the other libraries by shared topics.

Work with me

Stuck on something specific?

Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.

  • 1:1 Mentorship
  • Fresh Graduate Mentorship
  • Career Guidance

Brand deals, promos and partnerships: tauseeffayyaz@gmail.com