$ show luc-github/ESP3D
ESP3D is a feature-rich embedded firmware for ESP8266/ESP32 microcontrollers, designed to serve as a Wi-Fi/Ethernet bridge and full-featured controller for 3D printers, CNCs, and similar equipment. The firmware provides a modular architecture with support for multiple network protocols (HTTP, WebDAV, FTP, Telnet, WebSocket, Bluetooth), a web-based user interface, file system management (SD card, flash filesystems like LittleFS/SPIFFS), sensor integration (DHT, BMP280), Lua scripting, and graphical displays via LVGL or TFT_eSPI. It includes a comprehensive command system (ESPxxx commands) for configuration and control, with authentication levels and persistent settings. The codebase demonstrates solid engineering for an embedded Arduino project, with clear separation of concerns between core services (serial, network, display, filesystem) and a message-passing inter-module communication pattern. It bundles many well-known third-party libraries (LVGL 8.2.0, TFT_eSPI 2.5.43, SdFat 2.2.3, EspLuaEngine, arduinoWebSockets) directly in the repository, ensuring reproducible builds but also creating a maintenance burden. The firmware is actively maintained with a responsive issue tracker and regular commits, though the reliance on pinned library versions and heavy conditional compilation introduces some technical drift.
The LLM identified 3 files worth highlighting for reuse:
Provides a hardware abstraction layer (HAL) for ESP32 and ESP8266, encapsulating pin control, analog reading, watchdog timer, chip ID, and temperature sensing. The interface is platform-independent, and the implementation uses conditional compilation (#ifdef) to handle the two architectures. This pattern is reusable for any ESP-based firmware that needs to isolate board-specific code.
A fixed-size, thread-safe message FIFO implemented as a C++ template class. Uses FreeRTOS semaphores (with ESP8266 fallback stubs) for mutual exclusion and supports parameterizable buffer size, push/pop operations, and a callback-based iteration method. This is a self-contained component that can be extracted and reused in any embedded project requiring inter-task communication.
Implements a type-safe persistent settings store supporting byte, integer, string, IP address, float, mask, and bitset fields. Reads and writes from flash/EEPROM using a generic interface, with range validation and default values. This pattern is suitable for any embedded device that needs to store user configuration and can be adapted to different backends.