Created
February 9, 2015 08:54
-
-
Save yudanta/033d0b32b3a5d8c9571a to your computer and use it in GitHub Desktop.
connecting mindwave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import mindwave, time | |
headset = mindwave.Headset('/dev/tty.MindWaveMobile-DevA', '8FA4') | |
time.sleep(5) | |
headset.connect() | |
print "Connecting..." | |
#print headset.status | |
#print headset | |
#print headset.rawValue() | |
''' | |
while headset.status != 'connected': | |
print headset.status | |
time.sleep(0.5) | |
if headset.status == 'standby': | |
headset.connect() | |
print "Retrying connect..." | |
print "Connected." | |
''' | |
while True: | |
time.sleep(0.5) | |
print "Attention: %s, Meditation: %s" % (headset.attention, headset.meditation) | |
print headset.raw_value | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment