title: Using NeuroSky's Mindwave Mobile(to measure brainwave) and Raspberry 3 to do FFT(to get certain frequency) with Python 2.7
body: <p>I'm using <em>NeuroSky's Mindwave Mobile</em> and <em>Raspberry 3</em> to do FFT with <code>Python 2.7</code>.</p>
  
  <p>Presently, I got raw data which is sampled brainwave data.</p>
  
  <p>We can get raw data at 512 per sec. That means, Sampling Frequency is 512Hz,
  but I don't know what to do. I found on the internet that I should first install <code>numpy</code> but I seem to be unable to get FFT working.</p>
  
  <p>How can I use real-time data (raw data of measures using Mindwave Mobile) to do FFT?</p>
  
  <p>Can you guys help me from first stage(install <code>numpy</code>) to final stage (do FFT)?</p>
  
  <p>The following picture shows measured raw data, and next it's my code:</p>
  
  <p><a href="https://i.stack.imgur.com/e8HHn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/e8HHn.png" alt="enter image description here"></a></p>
  
  <pre><code># -*- coding: utf-8 -*-
  import time
  import bluetooth
  from mindwavemobile.MindwaveDataPoints import RawDataPoint
  from mindwavemobile.MindwaveDataPointReader import MindwaveDataPointReader
  import textwrap
  from mindwavemobile.MindwaveDataPoints import EEGPowersDataPoint
  
  
  if __name__ == '__main__': #외부에서 호출시
      mindwaveDataPointReader = MindwaveDataPointReader() #인스턴스 생성
      mindwaveDataPointReader.start()
      if (mindwaveDataPointReader.isConnected()):    
          while(True):
              dataPoint = mindwaveDataPointReader.readNextDataPoint() 
              #if (not dataPoint.__class__ is RawDataPoint):
                  #print dataPoint        
              if (dataPoint.__class__ is RawDataPoint): 
                  print dataPoint
      else:
          print(textwrap.dedent("""\
              Exiting because the program could not connect
              to the Mindwave Mobile device.""").replace("\n", " "))
  </code></pre>