Skip to content

Instantly share code, notes, and snippets.

@robintibor
Last active December 28, 2016 20:27
Show Gist options
  • Save robintibor/5d6160f56824974c95f4f5afd104a076 to your computer and use it in GitHub Desktop.
Save robintibor/5d6160f56824974c95f4f5afd104a076 to your computer and use it in GitHub Desktop.
Reading attention meditation values from neurosky
from mindwavemobile.MindwaveDataPointReader import MindwaveDataPointReader
mindwaveDataPointReader = MindwaveDataPointReader()
# connect to the mindwave mobile headset...
mindwaveDataPointReader.start()
while True:
# read one data point, data point types are specified in MindwaveDataPoints.py'
dataPoint = mindwaveDataPointReader.readNextDataPoint()
if hasattr(dataPoint, 'attentionValue'):
# do whatever you want to do with dataPoint.attentionValue
pass
if hasattr(dataPoint, 'meditationValue'):
# do whatever you want to do with dataPoint.meditationValue
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment