Skip to main content

Overview

This guide walks through the complete flow: initialize WASM, connect to a Muse headband over Web Bluetooth, stream EEG frames, and compute real-time band powers.

Prerequisites

  • @elata-biosciences/eeg-web and @elata-biosciences/eeg-web-ble installed
  • Chrome/Edge browser with Web Bluetooth support
  • A Muse 2 or Muse S headband
  • HTTPS or localhost for development

Full Example


Graceful Shutdown


Handling Reconnection


Architecture


Tips

  • Buffer frames for smoother analysis — band_powers works best with 1-2 seconds of data (256-512 samples at 256 Hz)
  • Use Float64Array for best WASM interop performance
  • Handle the Bluetooth pickerconnect() triggers a browser-native device picker that the user must interact with
  • Test with synthetic data first during development if no headband is available