EspHelper is a collection of single-header Arduino helpers that expose ESP-IDF capabilities with lightweight, idiomatic APIs. Drop the .h you need into a sketch whenever you want Arduino-style ergonomics but still reach for the power of the underlying ESP-IDF components.
- Header-only wrappers: drop the
.hfile you need into a sketch without pulling extra dependencies. - Arduino-friendly defaults: utilities work with
Print,String, and familiar Arduino idioms. - Works alongside the ESP-IDF components that are already bundled in current Arduino-ESP32 releases.
- Examples kept minimal so you can copy/paste straight into an existing project.
- JSON: Overview – Helpers: JsonGenerator, JsonParser, cJSON, CBOR
- FreeRTOS: Overview – Helpers: Task, Queue, Semaphore, Mutex, MessageBuffer, StreamBuffer, Ringbuffer
- Utility: Overview – Helpers: QrCode, Dsp, Event, Sodium
- Display: Overview – Helpers: Lcd, RgbStrip
- Network: Overview – Helpers: Mqtt, HttpServer
- Info: Overview – Helpers: BoardSettings
EspHelperJsonGenerator.h: Arduino-style facade overespressif/json_generator, including static buffers, streaming, and reset patterns.EspHelperJsonParser.h: Thin wrapper forespressif/json_parserthat manages token buffers and exposes typed getters & navigation helpers.EspHelperCJson.h: RAII convenience layer for ESP-IDF'scJSON, enabling complex manipulations, parsing, and pretty-printing without manual memory handling.EspHelperCbor.h: JSON-like builder/reader utilities on top of the ESP-IDFespressif/cbor(TinyCBOR) component so you can emit compact CBOR payloads.EspHelperQrCode.h: Captures QR bitmaps generated viaespressif/qrcodeso you can render them as ASCII or paint them onto any display.EspHelperDsp.h: Real-valued FFT and FIR helpers on top ofesp_dsp, complete with Hann windows and FIR delay-line management.EspHelperEvent.h: Minimal RAII interface aroundesp_event, covering default/custom loops, handler registration, and posting helpers.EspHelperSodium.h: Convenience wrappers for libsodium randomness,crypto_secretbox, and Ed25519 signatures.EspHelperLcd.h: Simple SPI ST7789 helper built onesp_lcd, covering bus init, draw helpers, and backlight control.EspHelperMqtt.h: Wrapper overesp-mqttwith Arduino-style lifecycle, single event callback, and helpers for publish/subscribe operations.EspHelperHttpServer.h: Lightweight wrapper aroundesp_http_serverwith WebServer-like route registration helpers.EspHelperRgbStrip.h: Blocking convenience class that fans outrgbLedWrite()calls across discrete RGB LEDs using an Adafruit_NeoPixel-like API.EspHelperTask.h: RAII convenience wrapper for FreeRTOS tasks (start/stop with C++ lambdas).EspHelperQueue.h: Template FreeRTOS queue helper that wrapsxQueueSend/xQueueReceivewith C++ ergonomics.EspHelperSemaphore.h: Binary/counting semaphore wrapper with RAII creation and typedgive/take.EspHelperMutex.h: Thin RAII mutex helper built atopxSemaphoreCreateMutex.EspHelperMessageBuffer.h: Convenience layer over FreeRTOS message buffers that preserves per-message framing and exposes peek/space helpers.EspHelperStreamBuffer.h: Arduino wrapper for FreeRTOS stream buffers, ideal for byte pipes between tasks or ISRs (with optional trigger levels and static allocation).EspHelperRingbuf.h: RAII helpers for FreeRTOSringbuf, covering dynamic/static creation, ISR-safe send/receive, and auto-returned items.EspHelperBoardSettings.h: Serial dump helper for Arduino-ESP32 board, USB, flash, and partition settings at runtime.
- Arduino core for ESP32 (v2.0.0 or newer) or a PlatformIO environment targeting
esp32. - A C++17 capable toolchain (the default for modern Arduino-ESP32).
- Clone or download this repository into your Arduino
librariesdirectory so that the folder becomes~/Arduino/libraries/EspHelper. - Include the header you need from
src/in your sketch. The ESP-IDF components leveraged by EspHelper are already part of recent Arduino ESP32 cores, so no additional setup is necessary.
MIT License – see LICENSE.