Skip to content
AddeyXPublic

About

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

47 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LRA Lab

LRA Lab is a local workspace for designing haptic signatures and feeling them on an LRA (linear resonant actuator). Its long-term direction is a hands-on editor with the immediacy of a music production tool: compose a pattern, adjust its timing and intensity, and preview it on hardware. The current release is a focused single-track studio backed by ESP32 firmware and a small serial protocol.

V1 scope

The definitive V1 scope records planned workspace, playback, hardware setup, firmware download, and static deployment requirements. It takes precedence over earlier product scope documents. The sections below describe the current implementation.

How it fits together

Web app (compose and validate)
    → Web Serial, serial port, JSON messages
ESP32 firmware (validate and schedule playback)
    → I²C
DRV2605L haptic driver → LRA

The browser sends a complete signature to the board. Firmware stores it in RAM and handles playback timing locally, so a browser scheduling delay does not shape the haptic output. The app can also generate Arduino C++ for using a signature in another firmware project.

Playback duration and storage calculations explain potential extensions beyond five seconds and the flash/RAM tradeoffs of dense 10 ms patterns.

Directory Purpose Stack
webapp/ Signature editor, device connection, live preview, C++ export SvelteKit, Svelte 5, TypeScript, Vite, Web Serial
firmware/ Device protocol, validation, calibration, playback ESP32, Arduino, PlatformIO, DRV2605L, ArduinoJson

Current capabilities

  • Compose one sequential track up to five seconds with built-in DRV2605L effects and custom amplitude envelopes.
  • Connect through desktop Chrome or Edge, calibrate the LRA, preview a signature, and stop playback.
  • Keep the current draft in browser local storage, save named browser projects, import/export signature JSON, and copy or download generated Arduino C++.
  • Reject invalid signatures on both sides of the serial connection. Firmware enforces a five-second playback limit.

The app builds as a static site and runs locally or on HTTPS. It has no account, cloud storage, or server API. Choose your ESP32 board and firmware pins in Arduino IDE or PlatformIO. The included C3 / 170 Hz configuration is an example requiring actuator-specific review; see firmware/README.md before connecting an actuator.

Start

  1. Build and upload firmware using the steps in firmware/README.md.

  2. Start the web app:

    cd webapp
    pnpm install
    pnpm dev
  3. Open the displayed local address in desktop Chrome or Edge. Close any serial monitor, select Connect board, then Calibrate. Add effects or a custom pulse and select Preview.

Hardware connection requires desktop Chrome or Edge with Web Serial on HTTPS or localhost. Offline editing and simulated preview do not require Web Serial. See webapp/README.md for editor details, commands, and checks. See firmware/README.md for wiring, board configuration, and protocol details.

About

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages