Open daniellasry opened 5 years ago
Daniel, thanks for looking into this. Mentioning @omarclaflin .
The API for this should look something like
from openbci import wifi as bci
# for analog
shield = bci.OpenBCIWiFi(ip_address = '192.168.1.141', log=True, high_speed=True, aux_mode='analog')
# for digital
shield = bci.OpenBCIWiFi(ip_address = '192.168.1.141', log=True, high_speed=True, aux_mode='digital')
def printData(sample):
print(sample.sample_number)
print(sample.channel_data)
print(sample.analog_data)
shield.start_streaming(printData)
shield.loop()
hey @omarclaflin, it's not implemented yet, but it will be by next week. I'll keep you posted.
hey @omarclaflin , thanks for testing it out. hang tight, the code is still a work in progress!
This was brought up in issue: OpenBCI/OpenBCI_WIFI#86 When switching to analog mode, no data is streaming from the Cyton. Example code:
This will print a whole bunch of zeroes.
This is because there is no analog data parsing in the Python SDK. See the empty function here: https://github.com/OpenBCI/OpenBCI_Python/blob/069bbcb9167261d687ec37206d1d2f59ace137d8/openbci/utils/parse.py#L140-L141
The implementation should be similar to the one in the NodeJS code. See here, and here