Collects data from any OpenBCI board into buffers.
create a new instance
board |
an instance of a OpenBCI subclass (for example a CytonSerial or GanglionWifi). |
maxSize |
the number of slots in both data and accelerometer buffers. If the data is not read fast enough, the buffers will fill up to this size and then start dropping values (fifo). |
dataActive |
a Boolean flag indicating if data should be buffered or not. |
accelActive |
a Boolean flag indicating if accelerometer data should be buffered or not. |
get the board instance
start buffering
stop buffering
read the data buffer and clear it. This should be called at regular intervals. Faster than the buffer is filling up (depends on sample rate).
a List of arrays with n-channels data values.
read the accelerometer buffer and clear it. This should be called at regular intervals. Faster than the buffer is filling up (depends on sample rate).
a List of arrays with xyz values.
a Boolean flag indicating if data should be buffered or not.
a Boolean flag indicating if accelerometer data should be buffered or not.
a Boolean flag indicating if the data buffer filled up to its maximum.
a Boolean flag indicating if the accel buffer filled up to its maximum.
get or set the maxSize.
current data buffer. Read without clearing.
current accel buffer. Read without clearing.
clear buffers and flags