I'm using NeuroSky's Mindwave Mobile and Raspberry 3 to do FFT with Python 2.7.
Presently, I got raw data which is sampled brainwave data.
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 numpy but I seem to be unable to get FFT working.
How can I use real-time data (raw data of measures using Mindwave Mobile) to do FFT?
Can you guys help me from first stage(install numpy) to final stage (do FFT)?
The following picture shows measured raw data, and next it's my 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", " "))
