ESP32-LAB is a long-term research and implementation repository for ESP32, focused on clean architecture, real-world IoT patterns, and production scalability.
This repository is not a short-lived demo project. It is designed as an ESP32 laboratory, where core features are implemented, tested, and reused across future products.
- Understand and implement the full capabilities of ESP32
- Apply IoT best practices (MQTT, OTA, Power, Security)
- Strictly separate business logic from hardware
- Enable development & testing without ESP32 hardware
- Seamlessly port code to real ESP32 devices
- Serve as a foundation for future IoT / audio products
-
Core logic must be platform-agnostic
-
ESP32 acts only as a platform adapter
-
The same logic should run on:
- PC mock (no hardware required)
- Real ESP32 hardware
Core Logic (platform-agnostic)
↓
Platform Adapter
- PC Mock
- ESP32
esp32-lab/
├── README.md
├── docs/ # Architecture & roadmap documentation
│ ├── architecture.md
│ ├── roadmap.md
│ └── conventions.md
├── core/ # Hardware-independent logic
│ ├── network/ # Wi-Fi, MQTT, HTTP
│ ├── audio/ # Audio logic (playback, queue, state)
│ ├── system/ # State machine, configuration
│ └── utils/
├── examples/ # Feature-based ESP32 examples
│ ├── wifi/
│ ├── mqtt/
│ ├── audio/
│ ├── ble/
│ └── ota/
├── tools/
│ └── pc-mock/ # ESP32 simulation on PC
└── platformio.ini
-
VS Code
-
PlatformIO
-
Frameworks:
- Arduino (early phases)
- ESP-IDF (advanced, optional)
-
MQTT: PubSubClient
-
JSON: ArduinoJson
-
Audio: ESP32-audioI2S
-
MQTT Broker: Mosquitto / HiveMQ
- Wi-Fi connection & reconnection
- Logging & configuration management
- JSON parsing & validation
- HTTP client
- MQTT publish / subscribe
- Command & message schema
- Event-driven design
- State machine
- Retry, timeout & error handling
- Download MP3 from URL
- Low-bitrate MP3 playback
- Audio queue & interrupt handling
- PC-based ESP32 mock
- MQTT + API integration tests
- Simulated audio output
- OTA updates
- Power management (sleep modes)
- BLE
- Security (TLS, certificates)
- Implement features in core
- Test using PC mock
- Port adapter to ESP32 hardware
- Upload via PlatformIO
- Optimize memory & performance
- Prepare OTA deployment
- No dependency on ESP32 emulators
- No hardware-coupled business logic
- No single-use demo code
ESP32-LAB is designed to:
- Provide a structured way to master ESP32
- Enable real-world IoT & audio device development
- Serve as a reusable codebase for multiple projects
This repository is meant to evolve over years, not weeks.
- Architecture quality is prioritized over the number of examples
- Every feature is implemented with a production mindset
Happy hacking 🚀