OXRecorder Firmware
Developer documentation & API reference
This is the central reference for every class in the
OXRecorder namespace. Each class has an API
reference page (what every method and parameter does, with
copy-paste examples) and a How It Works page (the design
and internals). Use the sidebar — or the search box in it — to navigate.
Want to reuse this code in your own project? The SDK & download page shows how to download the managers as a ready-to-use PlatformIO SDK and wire it up.
Hardware blueprint
The OXRecorder hardware is an ESP32-S3 Super Mini with three peripherals: an INMP441 microphone (I2S), a microSD adapter (SPI), and a WS2812 status LED, powered by a 3.7 V LiPo battery through a TP4056, plus a battery-sense divider on GPIO3 and a reset button on GPIO5. The full pin map is below — anyone with this page can build the board. Each peripheral's detailed wiring is on its How It Works page (mic, SD, LED, battery sense).
OXRecorder hardware blueprint — power: Battery → TP4056 (5 V) → ESP32-S3, microSD & INMP441 on the ESP32's 3V3 output; GPIO3 senses the raw battery VCC/GND terminals through a 1k/1k divider, not the TP4056 output rail; 10uF across microSD VCC/GND; 330 Ω and a level shifter on the WS2812 data line if the LED runs at 5 V.
| Peripheral | Peripheral pin | ESP32-S3 Super Mini | Managed by |
|---|---|---|---|
| INMP441 mic (I2S) | SCK | GPIO9 | OXAudioManager |
WS | GPIO8 | ||
SD | GPIO7 | ||
L/R | GND | ||
| microSD (SPI) | CS | GPIO10 | OXFileManager |
SCK | GPIO11 | ||
MISO | GPIO13 | ||
MOSI | GPIO12 | ||
VCC | 3V3 with 10uF to GND at adapter | ||
GND | GND | ||
| Battery sense divider | top resistor 1k | raw battery VCC / cell +, before TP4056 output | OXBatteryManager |
| midpoint | GPIO3 (ADC) | ||
bottom resistor 1k | raw battery GND / cell − | ||
| WS2812 LED | DIN | GPIO4 via 330 Ω; level shift if LED VDD is 5 V | OXLEDManager |
| Reset button | terminal A | GPIO5 (strapping pin) | OXConfigManager — hold 10 s to reset |
| terminal B | GND |
Signal pins are the firmware defaults and can be overridden in each
manager's begin(). Internal flash storage (LittleFS) needs no
wiring.
Power topology
The 3.7 V LiPo feeds a TP4056 module, which charges the cell and boosts its output to 5 V. That 5 V rail powers the ESP32-S3 Super Mini (5V pin). The INMP441 and a 3.3 V-compatible microSD adapter run from the ESP32-S3's regulated 3V3 output, not the 5 V rail.
| From | To | Rail | Notes |
|---|---|---|---|
| Battery 3.7 V (+/−) | TP4056 B+ / B− | 3.7 V | Charge + protect the cell. |
| TP4056 OUT 5 V | ESP32-S3 Super Mini 5V | 5 V | Boosted output powers the MCU board. |
ESP32-S3 3V3 out | microSD VCC | 3.3 V | Use an adapter with 3.3 V MISO; place 10uF from VCC to GND near the adapter. |
| TP4056 OUT 5 V | WS2812 5V | 5 V | Use a 3.3 V-to-5 V level shifter between GPIO4 and DIN. |
| Battery cell + / − | GPIO3 through 1k/1k divider | ADC sense | Top resistor goes to raw battery VCC; bottom resistor goes to raw battery GND. Do not connect this divider to TP4056 OUT 5 V. |
ESP32-S3 3V3 out | INMP441 VDD | 3.3 V | Mic runs on the MCU's regulated 3.3 V only. |
Common GND | all devices | — | TP4056, MCU, mic, SD, and LED share ground. |
The ESP32-S3 GPIOs are not 5 V tolerant. Keep the SD bus at 3.3 V, and
add a 3.3 V-to-5 V level shifter after the 330 Ω series resistor when the
WS2812 runs at 5 V. The SD adapter should have a local 10uF capacitor from
VCC to GND to absorb card current spikes. The
INMP441 is kept on 3.3 V because it is a 1.8–3.6 V part.
Classes
-
OXLog
OXRecorder::OXLog
Centralized, level-based logging facility. Wraps the serial transport so all firmware output flows through one extensible API.
-
OXFileManager
OXRecorder::OXFileManager
Unified read/write access to internal flash (LittleFS, quota-bounded) and the external SD card (SdFat/exFAT), with streaming writes.
-
OXSecurity
OXRecorder::OXSecurity
Instance-based AES-256-CBC encrypt/decrypt for strings and binary data, with per-instance key and IV for local vs. server use.
-
OXAudioManager
OXRecorder::OXAudioManager
INMP441 microphone capture — start/stop/pause recording and receive continuous 16-bit PCM via callback or read(), for further processing.
-
OXLEDManager
OXRecorder::OXLEDManager
WS2812 status LED — distinct color + animation per application state (pairing, Wi-Fi, recording, faults), so the light shows what the device is doing.
-
OXBatteryManager
OXRecorder::OXBatteryManager
ADC battery / power-rail sensing on GPIO3 — reads a resistor divider, reconstructs the source voltage, and maps it to a percentage with a configurable drop curve.
-
OXSwitchManager
OXRecorder::OXSwitchManager
GPIO switch monitoring — debounced on/off state and configurable long-press detection (5 s, 10 s, …) with per-pin callbacks.
-
OXConfigManager
OXRecorder::OXConfigManager
Central config store plus the hardware reset feature — a long press on GPIO5 triggers a reset callback, built on OXSwitchManager.
-
OXWirelessManager
OXRecorder::OXWirelessManager
The transport layer: the Wi-Fi and Bluetooth (NimBLE) chips, their connection state, raw data exchange, and per-radio byte statistics — behind injectable transports. Protocol logic lives in OXAPIManager.
-
OXAPIManager
OXRecorder::OXAPIManager
The protocol layer on top of OXWirelessManager: inbound REST routing and Bluetooth command dispatch, plus an outbound REST client with chunked streaming uploads — behind an injectable HTTP client.
No classes match your search.