Ecosystem architecture overview — projects: puara-module, puara-module-templates, puara-arduino, puara-gestures
Developed by the Société des Arts Technologiques (SAT) and the Input Devices and Music Interaction Laboratory (IDMIL)
Puara is a framework for building networked musical controllers and interactive installations on ESP32 boards. Rather than one repository, it's an ecosystem of four repos with distinct, complementary roles: a core device library, a sensor-to-gesture library, and two IDE-specific packagings of ready-to-flash example firmware built on top of both.
puara-module and can be used standalone in any C++ project.puara-module (and, where relevant,
puara-gestures, CNMAT's OSC library, BLE, or libmapper) into eight ready-to-build example
devices, for use in VS Code + PlatformIO.puara-module-templates, but packaged as Arduino
sketches distributed through the puara-module Arduino library
(File > Examples > puara-module) for the Arduino 2.0 IDE. Currently ships five of the
eight templates (basic, OSC-Send, OSC-Receive, OSC-Duplex, BLE advertising).
puara-module and puara-gestures are the two core libraries — independent of each
other, each usable on its own. The two template repos both consume them to produce ready-to-flash example
projects, one packaging for each supported toolchain; the projects are kept equivalent across both so a
person can follow either the PlatformIO or the Arduino path and get the same behavior. Either path ends the
same way: build and upload firmware, then separately build and upload the filesystem image (LittleFS by
default, SPIFFS optionally), onto a physical ESP32 board.
config.json from the
filesystem and attempts one of three modes: Station-Access Point (STA-AP), the default,
where the device both joins an existing network and creates its own; Access Point (AP) only,
where it only creates its own network; or Station (STA) only (persistent_AP=0),
where it only joins an existing network and never advertises its own, useful for reducing WiFi pollution
and improving security.http://192.168.4.1 in AP mode, or the address from
puara.staIP() in STA/STA-AP mode) or, if mDNS is enabled (default), by hostname (e.g.
http://puara_001.local). Through this UI, values defined in /data/settings.json
can be edited and persist across reboots, and are read in code with
puara.getVarText("name") / puara.getVarNumber("name").puara-gestures descriptors, and reacting to events.
A registered onSettingsChanged() callback re-reads updated settings whenever the user saves
changes through the web UI, so parameters like OSC IP/port take effect immediately without a rebuild.
Firmware and filesystem are two separate uploads. The firmware is the compiled program
logic; the filesystem (LittleFS/SPIFFS) holds config.json, settings.json, and the
web UI's HTML/CSS — both must be built and uploaded (PlatformIO: Upload Filesystem Image +
Upload; Arduino IDE: the
Arduino-LittleFS-Upload plugin's
Upload LittleFS to Pico/ESP8266/ESP32 command, plus the normal sketch upload).
Both puara-module-templates (PlatformIO) and puara-arduino (Arduino IDE) ship
the same underlying examples; the table below notes which are currently available in each.
| Template | What it demonstrates | In templates | In arduino |
|---|---|---|---|
| Basic | Core module functionality: reads settings, prints dummy sensor data to serial | ✅ | ✅ |
| OSC-Send | Sends sensor data as OSC to a configurable IP/port | ✅ | ✅ |
| OSC-Receive | Receives OSC (e.g. /led/brightness f 0.34) and drives an output | ✅ | ✅ |
| OSC-Duplex | Combines OSC-Send and OSC-Receive in one sketch | ✅ | ✅ |
| BLE advertising | Broadcasts CBOR-encoded sensor data via BLE advertising, no connection needed | ✅ | ✅ |
| Basic Gestures | Extends Basic with puara-gestures gesture recognition on a pseudo-IMU | ✅ | — |
| Button OSC | Button tap/double-tap/hold detection via puara-gestures, sent as OSC | ✅ | — |
| Libmapper OSC | Registers signals with libmapper alongside OSC messaging | ✅ | — |
puara-gestures is intentionally decoupled from networking or hardware specifics — it just turns
numeric sensor streams into gesture-shaped signals:
| Descriptor | Purpose |
|---|---|
Jab, Jab2D, Jab3D | Simple motion-burst detectors across 1, 2, or 3 axes |
Shake, Shake2D, Shake3D | Smooth motion-energy tracking for vibration/shaking, with a threshold and decay |
Tilt, Roll | Orientation signals from full 9DoF IMU data |
Tilt_Roll | Fast roll/tilt from accelerometer data alone (no gyro/magnetometer needed) |
TouchArrayGestureDetector | Brush/rub and swipe-style features for touch sensor arrays |
Button | Tap, double-tap, hold, and press-count tracking from a digital input |
Supporting utils/ helpers: rollingminmax (sliding min/max),
leakyintegrator (smooth decay / energy tracking), maprange (range scaling),
smooth (moving average), threshold (clamping), wrap (angle wrapping),
discretizer (change detection), circularbuffer (fixed-size history).
puara-gestures builds standalone via CMake, or as a PlatformIO lib_deps entry
(https://github.com/Puara/puara-gestures.git#v0.2.0), optionally paired with
https://github.com/malloch/IMU_Sensor_Fusion.git for full IMU sensor fusion support.
The BLE advertising template is the one example that explicitly crosses into a second, off-repo tool:
ble-cbor-to-osc.py
(its own GitLab repo, run in its own virtual environment), listens for these BLE advertisements, decodes
the CBOR payload, and forwards the values as OSC messages to 127.0.0.1:9001 by default
(configurable).This pattern — connectionless BLE broadcast in, OSC out on the receiving computer — is suited to distributed sensor networks and installations with many simultaneous low-data-rate devices, where per-device BLE connections wouldn't scale.
puara-module-templates)git clone https://github.com/Puara/puara-module-templates.gitbasic/).board field in platformio.ini to match your hardware.puara-arduino)puara-module library via the Library Manager.File > Examples > puara-module → pick a template.Tools > Partition Scheme pick a minimal-SPIFFS-style option
to leave enough room for the program.data/config.json (WiFi SSID/PSK) and data/settings.json (custom
variables) via Sketch > Show Sketch Folder.Upload LittleFS to Pico/ESP8266/ESP32 command for the filesystem.| Board | Status | PlatformIO ID | Arduino IDE board |
|---|---|---|---|
| M5StickC | ✅ | m5stick-c | M5StickC |
| TinyPICO | ✅ | tinypico | UM TinyPico |
| ESP32-C3-WROOM-02 / DevKitC-02 | ✅ | esp32-c3-devkitc-02 | ESP32C3 Dev Module |
| Adafruit ESP32-S3 Feather | ⚠️ manual boot-mode entry, slow serial | adafruit_feather_esp32s3 | Adafruit Feather ESP32-S3 2MB PSRAM |
| Adafruit ESP32-S3 TFT Feather | ⚠️ same caveats | adafruit_feather_esp32s3_tft | Adafruit Feather ESP32-S3 TFT |
| Seeed XIAO S3 | ⚠️ same caveats | seeed_xiao_esp32s3 | XIAO_ESP32S3 |
| DOIT ESP32 DevKit V1 | ⚠️ no minimal partition option in Arduino IDE (works via PlatformIO) | esp32doit-devkit-v1 | DOIT ESP32 DEVKIT V1 |
All four repositories are MIT-licensed, unless a specific file states otherwise.