Wiki: Reactive Brain Waves

For agents: Markdown version · Wiki index · Explore

Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.

Summary

The speaker demonstrates how to connect web browsers to physical devices using Web Bluetooth through a live-coding session. By pairing the browser with a brain-sensing headband, the speaker reads EEG data and processes it using reactive programming to detect eye blinks. The audience learns how JavaScript can interact with hardware peripherals and how stream processing libraries simplify handling real-time sensor data.

Key points

  • 1:00 The speaker introduces Web Bluetooth, an API that enables web browsers to communicate with nearby physical devices.
  • 3:06 The speaker demonstrates a commercial brain-sensing headband that measures brain waves and connects via Bluetooth.
  • 7:15 A project skeleton is initialized using vanilla JavaScript and module loading to interact with the hardware.
  • 9:18 The speaker connects to the device asynchronously using promises and async/await syntax.
  • 10:20 An event stream of EEG readings is established and subscribed to using reactive programming concepts.
  • 13:47 The data stream is filtered to isolate readings from a specific electrode placed above the left eye.
  • 17:53 Operators from the reactive programming library are applied to transform raw numeric spikes into binary blink states.
  • 22:53 The processed blink events are bound to a visual element in the browser to complete the interactive demo.

Takeaways

  • Web Bluetooth allows web developers to build browser applications that interact directly with local hardware and IoT devices.
  • Reactive programming libraries are powerful tools for processing asynchronous real-time data streams like sensor inputs.
  • Small amounts of JavaScript can be combined with affordable consumer hardware to create innovative accessibility interfaces.

Questions this talk answers

  • How can web applications communicate with physical devices via Bluetooth without native plugins?
  • How do you process and filter continuous streams of sensor data using reactive programming in JavaScript?
  • What are the current platform limitations and browser support status for Web Bluetooth?

Technologies

JavaScript, Web Bluetooth, RxJS, WebGL

Tags

browser apis, hardware, iot, javascript, reactive programming, web bluetooth