Cyton, Wifi Shield, Python (wifi.py): bad raw sample values / but fine using GUI
I'm using a Mac (macOS 10.14) with Python 3.6. I have a Cyton board coupled with the WiFi Shield - 8 channels. As of the date of this post, I have the latest firmware installed on both the Cyton and the Wifi Shield. Everything is configured and attached to the Ultracortex "Mark IV" headset using dry electrodes. With the latest version of OpenBCI GUI (4.0.3) everything works well. All 8 channels stream as expected.

However, I have a problem with using the wifi.py for streaming with Python (3.6). First, I want to point out that the square wave test works fine - I'm able to stream and display in realtime using matplotlib. When I switch over to streaming the raw data, it seems to "work", but it does not seem to contain any real "data"; I'm getting consistent sine waves from all the channels - almost seems like test data. Also, the values are very small float values, like .0283746734, etc. I notice that when I jiggle my head (while wearing headset), the waves look more like you would expect, but the "normal" stream for everything is very consistent sine waves.
See image below: this is a snapshot of what I'm getting. This image shows streaming at 250hz with a bandpass of 3Hz to 50Htz applied. Keep in mind that if I switch over to using the GUI software, all looks good. I can only assume that I'm doing something incorrectly. Ideas? Am I supposed to be taking voltage offset and gain into account? The way the python code is written in wifi.py and parese.py, I would say no. By the way (not that it made much of a difference), I fiddled with the parse.py and turned micro_volts = Ture, and scaled_output =False in the ParseRaw class; those values are usually the opposite of what comes out of the box. Final note: I'm using the latest python source code as supplied in the Git repository.
What gives?
Comments
(2) OpenBCIWiFi now applies the sample rate passed into the constructor
(3) New option to prevent OpenBCIWiFi from automatically connecting to board upon instantiation
(4) scaled_output and micro_volts can now be set in OpenBCIWiFi constructor
(5) prevent connection exception during OpenBCIWiFi instantiation by placing small time delay between shield discovery and connecting to the board
(6) New test to demonstrate how these changes/new options work