You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/Cyton/04-OpenBCI_Cyton_SDK.md
+44-34Lines changed: 44 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,36 +3,19 @@ id: CytonSDK
3
3
title: Cyton Board SDK
4
4
---
5
5
6
-
The OpenBCI Cyton boards communicate using a byte string (mostly ASCII) command protocol. This document covers command usage for the OpenBCI Cyton and 8-bit boards. Some of the commands are board-specific, where noted. Further, this document covers the commands needed to alter the radio system. There have been several iterations of the firmware: the 8-bit board runs `v0`, the Cyton runs `v1`, and boards shipped as of Fall 2016 run `v2.0.0`. `v3.0.0` began shipping with boards in August of 2017.
6
+
The OpenBCI Cyton boards communicate using a byte string (mostly ASCII) command protocol. This document covers command usage for the OpenBCI Cyton boards. Some of the commands are board-specific, where noted. Further, this document covers the commands needed to alter the radio system. There have been several iterations of the firmware: the 8-bit board runs `v0`, the Cyton runs `v1`, and boards shipped as of Fall 2016 run `v2.0.0`. `v3.0.0` began shipping with boards in August of 2017.
7
7
8
-
## Cyton Command Protocol Overview
9
-
10
-
Cyton boards have two powerful microcontrollers onboard and come pre-programmed with firmware. The RFduino radio link uses the Nordic Gazelle stack and library. The board-mounted RFduino is configured as a DEVICE. The microcontroller (PIC32MX250F128B or ATmega328P) has been programmed with firmware that interfaces between the ADS1299 (Analog Front End), LIS3DH (Accelerometer), micro SD (if installed), and RFduino (Radio module). The user or application controls the board by sending commands over a wireless serial connection. You should have received a Dongle with the OpenBCI board. The Dongle has an RFduino running the Gazelle library configured as a HOST and interfaces with your computer through a Virtual Com Port (FTDI).
11
-
12
-
On startup, the OpenBCI 8bit board (`v0`) sends the following text over the radio:
13
-
14
-
```
15
-
16
-
OpenBCI V3 8bit Board
17
-
Setting ADS1299 Channel Values
18
-
ADS1299 Device ID: 0x3E
19
-
LIS3DH Device ID: 0x33
20
-
$$$
21
-
22
-
```
8
+
:::info
23
9
24
-
the OpenBCI Cyton board with firmware `v1`sends the following text over the radio:
10
+
The Cyton 8-bit boards have been deprecated and so has `v0` and `v1`of the Cyton firmware. It is recommended to use the `v3.0.0` or later of the Cyton firmware. To update your Cyton firmware, follow the steps [here](../Cyton/05-Cyton_Board_Programming_Tutorial.md)
25
11
26
-
```
12
+
:::
27
13
28
-
OpenBCI V3 16 channel
29
-
ADS1299 Device ID: 0x3E
30
-
LIS3DH Device ID: 0x33
31
-
$$$
14
+
## Cyton Command Protocol Overview
32
15
33
-
```
16
+
Cyton boards have two powerful microcontrollers onboard and come pre-programmed with firmware. The RFduino radio link uses the Nordic Gazelle stack and library. The board-mounted RFduino is configured as a DEVICE. The microcontroller (PIC32MX250F128B or ATmega328P) has been programmed with firmware that interfaces between the ADS1299 (Analog Front End), LIS3DH (Accelerometer), micro SD (if installed), and RFduino (Radio module). The user or application controls the board by sending commands over a wireless serial connection. You should have received a Dongle with the OpenBCI board. The Dongle has an RFduino running the Gazelle library configured as a HOST and interfaces with your computer through a Virtual Com Port (FTDI).
34
17
35
-
the OpenBCI Cyton board with firmware `v2.0.0` sends the following text over the radio:
18
+
On startup, the OpenBCI Cyton board with firmware `v2.0.0` and later sends the following text over the radio:
36
19
37
20
```
38
21
@@ -46,10 +29,16 @@ $$$
46
29
47
30
Device ID info is useful for general board health confirmation. The $$$ is a clear indication to the controlling application that the message is complete and the Cyton board is ready to receive commands. As of `v2.0.0`, there is an additional printout to indicate the exact firmware version.
48
31
49
-
Pay attention to timing when sending commands using `v0` and `v1` firmware. There must be some delay before and after sending a command character from the PC (controlling program or user running a terminal). As of `v2.0.0`, this is no longer the case—send as fast as you can!
50
-
51
32
## Command Set
52
33
34
+
To send a command to the Cyton board through the dongle wirelessly, you can use the Hardware Settings panel. But, you must turn on the Expert Mode in the OpenBCI GUI. To do this, connect to the Cyton board and then click on the Settings -> Turn Expert Mode On button as shown below.
35
+
36
+

37
+
38
+
In the Hardware Settings panel, the Custom Commands box can be used to send SDK commands to the board. If successful, you will see a GUI message that the command was sent successfully.
39
+
40
+

41
+
53
42
### Turn Channels OFF
54
43
55
44
**1 2 3 4 5 6 7 8**
@@ -70,16 +59,37 @@ These ASCII characters turn the respective channels [1-8] on. The channel will r
70
59
71
60
**0 - = p []**
72
61
73
-
Turn **all** available channels on and connect them to the internal test signal. These are useful for self-test and calibration. For example, you can measure the internal noise by sending **0**, which connects all inputs to an internal GND. If streaming, the stream will be stopped, the proper registers set on the ADS1299, and the stream will be resumed.
62
+
These commands are useful for self-test and calibration. If you feel like your Cyton or Daisy boards are malfunctioning, these commands are a great way to make sure the ADS1299 is not damaged. For example, you can measure the internal noise by sending **0**, which connects all inputs to an internal GND. If streaming, the stream will be stopped, the proper registers set on the ADS1299, and the stream will be resumed.
63
+
64
+
-`0` Connect to internal GND (VDD - VSS)
65
+
66
+
When connected to Internal GND, the ADS1299 inputs are essentially shorted and measuring the internal or system noise. A normal working board will report 0.01% railed and 0.09-0.14 uVrms.
67
+

68
+
69
+
-`-` Connect to test signal 1xAmplitude, slow pulse
70
+
71
+
A working Cyton or Daisy board will output square waves that are between 1855 - 1865 uVrms and 1.01% railed as shown below. To view the square waves properly, you will have to turn off all filters and set the scale to "Auto".
-`=` Connect to test signal 1xAmplitude, fast pulse
75
+
76
+
A working Cyton or Daisy board will output square waves that are between 1855 - 1865 uVrms and 1.01% railed as shown below. To view the square waves properly, you will have to turn off all filters and set the scale to "Auto".
When connected to DC signal, the ADS1299 inputs are essentially measuring the DC Bias. A normal working board will report 2.01% railed and 0.13-0.16 uVrms.
82
+

83
+
84
+
-`[` Connect to test signal 2xAmplitude, slow pulse
85
+
86
+
A working Cyton or Daisy board will output square waves that are between 3680 - 3715 uVrms and 2.01% railed as shown below. To view the square waves properly, you will have to turn off all filters and set the scale to "Auto".
87
+

74
88
75
-
-**0** Connect to internal GND (VDD - VSS)
76
-
-**-** Connect to test signal 1xAmplitude, slow pulse
77
-
-**=** Connect to test signal 1xAmplitude, fast pulse
78
-
-**p** Connect to DC signal
79
-
-**\[** Connect to test signal 2xAmplitude, slow pulse
80
-
-**]** Connect to test signal 2xAmplitude, fast pulse
89
+
-`]` Connect to test signal 2xAmplitude, fast pulse
81
90
82
-
**Note: Not all possible internal test connections are implemented here.**
91
+
A working Cyton or Daisy board will output square waves that are between 3680 - 3715 uVrms and 2.01% railed as shown below. To view the square waves properly, you will have to turn off all filters and set the scale to "Auto".
92
+

83
93
84
94
**returns** If not streaming, returns `Success: Configured internal test signal.$$$`; if streaming, there is no confirmation.
0 commit comments