CytonWifi:
Filter:
OpenBCI-SuperCollider/Classes (extension) | External Control

CytonWifi
ExtensionExtension

for communicating with a Cyton board (8ch)

Description

this class is for communication via wifi osc (wifishield). use CytonSerial for the bluetooth dongle.

NOTE: does not survive CmdPeriod.

Class Methods

.new

open communication

Arguments:

netAddr

a NetAddr with the ip and port of the wifi shield. by default this is NetAddr("OpenBCI_WifiShieldOSC.local", 13999)

dataAction

set the OpenBCI: -dataAction

replyAction

set the OpenBCI: -replyAction. note that if none give a default function that just posts will be used.

initAction

set the OpenBCI: -initAction

bufferSize

how many datapoints to store in the internal buffer.

Instance Methods

.port

set the port that the wifi shield is sending to. by default this is 57120 (supercollider)

c.port= 9998 //send to port 9998

.latency

set the minimum time between packet sends in micro seconds. usable values are in the range of 100 to 15000. by default this is 5000. for high sample rates (16000Hz) a lower number might be needed here (~4000). else the packages will fill up the internal buffer inside the wifi shield before the data is sent out. for lower sample rates (250Hz) this latency value can be set to a higher value (~10000).

.netAddr

the NetAddr of the wifi shield.

.all

get heap info and other general info.

.board

get information about the attached board.

.name

get the unique name of the wifi shield.

.version

gives the version number of the firmware.

.close

stops main loop and free the internal osc responders.

Examples