kylemath / EEGEdu

Interactive Brain Playground - Browser based tutorials on EEG with webbluetooth and muse
http://eegedu.com
MIT License
172 stars 40 forks source link

Create/Load data stream for dev / no Muse #30

Closed kylemath closed 4 years ago

kylemath commented 4 years ago

https://github.com/neurosity/eeg-pipes/blob/master/src/utils/createEEG.js

need to change the input of the pipe into this need some way to turn this mode on and off that is not client facing ? Perhaps we do this is a default if their muse doesn't connect

kylemath commented 4 years ago

https://github.com/neurosity/eeg-pipes/blob/master/examples/createEEG.js


const { createEEG } = require("..");

// defaults to muse-lsl.csv
const eeg$ = createEEG();

// with custom csv file, can load file via webpack loader
const withCustomCsv$ = createEEG({
  csv: [] // insert your parsed csv content here
});

// with randomly generated data
const mock$ = createEEG({
  mock: true
});

// with NaN range injection
const mockNaN$ = createEEG({
  mock: true,
  NaNRange: [0.29, 0.31]
});

const sine$ = createEEG({ sine: 1 });

sine$.subscribe(console.log);
kylemath commented 4 years ago

working on a version that might put the output of createEEG right into the pipe in https://github.com/kylemath/EEGEdu/tree/mock

korymath commented 4 years ago

Data spec:

{electrode: 3, index: 5718, samples: Array(12), timestamp: 1575847285216.125}
electrode: 3
index: 5718
samples: (12) [-0.48828125, -0.48828125, 30.76171875, -62.98828125, 363.76953125, 977.05078125, -927.734375, -42.96875, -341.30859375, 897.4609375, -884.765625, 381.34765625]
timestamp: 1575847285216.125
__proto__: Object
  const takeSingle = client.eegReadings.pipe(take(1));
  takeSingle.subscribe((v) => {console.log(v);})
kylemath commented 4 years ago
Screen Shot 2019-12-09 at 10 30 44 AM
korymath commented 4 years ago

Closed with #66