3

After a weeks of hard going I've gotten the mindwave mobile connected via bluetooth to my Raspberry Pi. I'm using the following python scripts to access the data. https://github.com/robintibor/python-mindwave-mobile

The script successfully prints out the properties the MindWave measures (delta, theta, gamma, meditation, attention, etc..). Unfortunately, the way the code is written all of these properties are mysteriously being concatenated into a single return. Looking inside of the class I can't see (or at least don't understand) what method to call to retrieve a single property, such as 'Gamma' or 'Delta'. All of this conflation is taking place inside of MindwaveDataPointReader.py which I've been spelunking to no avail. However, I'm sure this would be short work for someone with more experience. Thanks.

Garth Vader
  • 41
  • 1
  • 4
  • 1
    I solved the problem. After tracking down where the data points I wanted to read were being set (MindwaveDataPoints.py), I created a new module (myVars.py) to act as a global container to write and pass along the values to where things are being output (read-mindwave-mobile.py). Scope was the real challenge. I found the answer in one of the replies to this post. http://stackoverflow.com/questions/142545/python-how-to-make-a-cross-module-variable – Garth Vader Jul 08 '13 at 03:46

1 Answers1

0

You can use this, I code it like this and worked, instead of AttentionDataPoint put the datapoint of your interest like MeditationDataPoint or whatever you are interested in.

dataPoint = mindwaveDataPointReader.readNextDataPoint()
        dataW = dataPoint.__class__
        if (dataW is AttentionDataPoint):
            atte = int(dataPoint.attentionValue)
            print(dataPoint)