Skip to content

Repository files navigation

PulseTerrain

PulseTerrain live connected-session 3D FFT terrain

An M5Stack StickS3 samples a PulseSensor and relays the raw signal over Bluetooth Low Energy. Chrome shows that PulseWave first, turns each FFT into a new ridge of live, orbitable 3D terrain, then shows which peaks belong to the same harmonic series.

One connection button. Raw feed, terrain, then harmonic evidence. No installable app and no build step.

Status: DEVELOPMENT. The BLE relay and browser visualization are a maker demo, not shipping PulseSensor firmware or a medical device. The screenshot above is a real connected-session capture; numerical labels are signal-analysis observations, not validated physiological measurements.

Visual tour

Real connected session

The lead image above and the analysis view below were captured while the StickS3 streamed a worn PulseSensor at 250 Hz over BLE.

PulseTerrain live harmonic analysis

Full Chrome experience

The complete page moves from the raw PulseWave into orbitable terrain and then into the harmonic evidence without leaving the browser.

Full PulseTerrain Chrome page

Harmonic analysis below the hero

The lower section keeps the spectrum, dotted harmonic markers, peak lists, classification table, and cautious possible-source labels together.

PulseTerrain harmonic spectrum and tables

System architecture

PulseSensor to StickS3 BLE to Chrome architecture

Hackster cover

This 4:3 composition is the prepared cover for the private Hackster draft.

PulseTerrain Hackster project cover

The whole system

  • StickS3: samples GPIO2 at 250 Hz and sends raw 12-bit values in BLE notifications.
  • Chrome: buffers the samples, applies a Hann window, runs a radix-2 FFT, draws the raw PulseWave, adds a terrain row about every 150 ms, and checks the strongest peak for confirmed 2×–5× harmonics.
  • You: drag to orbit, hold a modifier key while scrolling to zoom, then follow the cue beneath the terrain to the labeled spectrum and tables.

The terrain palette is fixed by frequency: amber below about 0.6 Hz, teal from 0.7–3.2 Hz, and violet above. The colors are visual organization, not a claim about what a peak means. Dotted teal paths and labels mark the detected fundamental and confirmed harmonics.

Harmonics below the terrain

The second half of the page restores the strongest parts of the reviewed Pulsewave Harmonics prototype:

  • a live 0–8 Hz spectrum with dotted f0, 2f5f, and top-five labels;
  • a harmonic-series list and independent top-five-peaks list;
  • a table showing which peaks actually belong to the detected series; and
  • a cautious possible-source table with confidence stars and an explicit frequency-heuristic / non-diagnostic boundary.

The detector uses the single strongest peak as the only fundamental candidate. A harmonic is listed only when independently significant energy appears near the expected multiple and clears both the noise-floor and relative-amplitude gates. Possible-source labels remain guesses; they are not validated heart-rate, breathing-rate, or medical measurements.

Hardware

Quantity Component Purpose
1 M5Stack StickS3 Samples and relays the signal
1 PulseSensor Kit Supplies the analog pulse wave

Wiring

Disconnect USB power before wiring.

PulseSensor lead StickS3
Signal / purple G2 / GPIO2
VCC / red 3V3
GND / black GND

Power the sensor from 3.3 V only. Do not connect it to 5 V.

Run it

1. Load the StickS3 relay

The verified target is UIFlow2 v2.4.9 MicroPython.

python3 -m pip install mpremote
git clone https://github.com/WorldFamousElectronics/PulseTerrain.git
cd PulseTerrain
python3 -m mpremote connect auto fs cp sticks3-relay.py :main.py

Reset the StickS3. It advertises over BLE automatically.

2. Open the Chrome view

python3 -m http.server 8127

Open http://localhost:8127/index.html in desktop Chrome and click Connect StickS3. localhost qualifies as the secure context required by Web Bluetooth.

The full Chrome capture in the visual tour is the reproducible synthetic preview. A later media pass will add the corresponding live StickS3/PulseSensor session.

3. Try the visual without hardware

Open http://localhost:8127/index.html?demo=1. The page labels this mode synthetic preview and generates a deterministic signal for documentation, layout review, and screenshots.

BLE packet

<uint32 first_index><uint16 count><uint16 rate_hz><uint32 t_us>
then count × uint16 little-endian samples

The sender uses the Nordic UART Service and notifies on its TX characteristic. The browser never writes configuration data to the StickS3. It tracks the absolute sample index so packet gaps are visible in the browser console.

  • Service: 6e400001-b5a3-f393-e0a9-e50e24dcca9e
  • TX notify: 6e400003-b5a3-f393-e0a9-e50e24dcca9e

Project family

PulseTerrain is the third StickS3 project in the current PulseSensor series:

  1. PulseLink — wear the sensor and see the pulse wave on the StickS3.
  2. Tab5 Remote Display — send the same PulseLink session to a touch dashboard.
  3. PulseTerrain — relay raw samples over BLE and let Chrome turn the FFT history into an orbitable landscape with linked harmonic evidence below.

Credits and provenance

The terrain renderer descends from PPGFFTGAMEENGINE. The StickS3 wiring and BLE packet lineage comes from PulseLink. See PROVENANCE.md for the exact terrain and harmonic-analysis migration boundary.

License

MIT © 2026 World Famous Electronics LLC.

About

StickS3 streams raw PulseSensor samples over BLE; Chrome shows the PulseWave, draws orbitable FFT terrain, and links its harmonics.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages