Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/docs/AddOns/Electrodes/00-ElectrodesLanding.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ OpenBCI Boards are compatible with a variety of different electrodes.

## EMG/ECG Foam Solid Gel Electrodes

[**Buy Here!**](https://shop.openbci.com/collections/frontpage/products/skintact-f301-pediatric-foam-solid-gel-electrodes-30-pack?variant=29467659395)
[**Buy Here!**](https://shop.openbci.com/products/kendall-emg-ecg-foam-solid-gel-electrodes-50-pack)

## EMG/ECG Snap Electrode Cables

Expand Down
4 changes: 2 additions & 2 deletions website/docs/Deprecated/14-MyoWare_Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ This tutorial will show you how to read EMG data (electrical signals from muscle
1. MyoWare board
2. OpenBCI Cyton board, with power source
3. OpenBCI dongle
4. Skintact sticky electrodes (for using the MyoWare board)
4. Solid Gel Electrodes (for using the MyoWare board)
5. Soldering iron and materials
6. Two male-male jumper wires (like [these](https://www.adafruit.com/product/266)), and three male-female jumper wires (like [these](https://www.adafruit.com/product/826))

Expand Down Expand Up @@ -69,7 +69,7 @@ When you have everything wired up, set the power switch on the MyoWare board to

### 4. Streaming EMG Data with the OpenBCI GUI

Attach three Skintact electrodes to the three electrodes on the MyoWare board, and then stick the board on a muscle you'd like to monitor. The adafruit MyoWare tutorial has good guidelines for MyoWare board placement: (https:).
Attach three Solid Gel Electrodes to the three electrodes on the MyoWare board, and then stick the board on a muscle you'd like to monitor. The adafruit MyoWare tutorial has good guidelines for MyoWare board placement: (https:).

You'll be able to see signals from the MyoWare electrodes in the OpenBCI GUI. If you connected E and M to the N1P pins on the OpenBCI board, then the MyoWare data will appear in channel 1.

Expand Down
4 changes: 2 additions & 2 deletions website/docs/Deprecated/15-MyoWare_Integration_Ganglion.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ This tutorial will show you how to read EMG data (electrical signals from muscle

1. MyoWare board
2. OpenBCI Ganglion board, with power source
3. Skintact sticky electrodes (for using the MyoWare board)
3. Solid Gel Electrodes (for using the MyoWare board)
4. Soldering iron and materials
5. Two male-male jumper wires (like [these](https://www.adafruit.com/product/266)), and three male-female jumper wires (like [these](https://www.adafruit.com/product/826))

Expand Down Expand Up @@ -63,7 +63,7 @@ When you have everything wired up, set the power switch on the MyoWare board to

### 4. Streaming EMG Data with the OpenBCI GUI

Attach three Skintact electrodes to the three electrodes on the MyoWare board, and then stick the board on a muscle you'd like to monitor. The Adafruit MyoWare tutorial has good guidelines for MyoWare board placement: (https:).
Attach three Solid Gel Electrodes to the three electrodes on the MyoWare board, and then stick the board on a muscle you'd like to monitor. The Adafruit MyoWare tutorial has good guidelines for MyoWare board placement: (https:).

You'll be able to see signals from the MyoWare electrodes in the OpenBCI GUI. If you connected E and M to the 1- and 1+ pins on the OpenBCI Ganglion board, then the MyoWare data will appear in channel 1.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/Examples/EMGProjects/01-EMG_Scrolling.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The following instructions have been written for use with Windows 10.
## Materials Required

1. OpenBCI [Cyton Board](https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel?variant=38958638542)
2. [Skintact sticky electrodes](https://shop.openbci.com/collections/frontpage/products/skintact-f301-pediatric-foam-solid-gel-electrodes-30-pack?variant=29467659395) or [IDUN Dryode](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
2. [Solid Gel Electrodes](https://shop.openbci.com/products/kendall-emg-ecg-foam-solid-gel-electrodes-50-pack) or [IDUN Dryode](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
3. [EMG/ECG Snap Electrode Cables](https://shop.openbci.com/collections/frontpage/products/emg-ecg-snap-electrode-cables?variant=32372786958)
4. Computer with downloaded OpenBCI [GUI](../../Software/OpenBCISoftware/01-OpenBCI_GUI.md)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The following instructions have been written for use with Windows 10.
## Materials Required

1. OpenBCI [Cyton Board](https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel?variant=38958638542)
2. [Skintact sticky electrodes](https://shop.openbci.com/collections/frontpage/products/skintact-f301-pediatric-foam-solid-gel-electrodes-30-pack?variant=29467659395) or [IDUN Dryode](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
2. [Solid Gel Electrodes](https://shop.openbci.com/products/kendall-emg-ecg-foam-solid-gel-electrodes-50-pack) or [IDUN Dryode](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
3. [EMG/ECG Snap Electrode Cables](https://shop.openbci.com/collections/frontpage/products/emg-ecg-snap-electrode-cables?variant=32372786958)
4. Computer with downloaded OpenBCI [GUI](../../Software/OpenBCISoftware/01-OpenBCI_GUI.md)

Expand Down
102 changes: 51 additions & 51 deletions website/docs/Examples/EMGProjects/05-EMG_Chrome_Dino_Game.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
---
id: EMG_Chrome_Dino_Game
title: EMG Chrome Dino Game
---
In this tutorial we will show you how to play the Google Chrome Dinosaur Game without touching your laptop. To do that, we will read EMG data from your arm muscles and find the peaks which correspond to flexing, using them to trigger a jump of the dinosaur.

Check out an example video of this tutorial being put into action!

![EMGdinogif](https://media.giphy.com/media/Iyxb0WAiUUvffbg3mV/giphy.gif)

The following instructions have been written for use with Linux 16.04.

## Materials Required

1. OpenBCI [Cyton Board](https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel?variant=38958638542)
2. [Skintact sticky electrodes](https://shop.openbci.com/collections/frontpage/products/skintact-f301-pediatric-foam-solid-gel-electrodes-30-pack?variant=29467659395) or [IDUN Dryodes](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
3. [EMG/ECG Snap Electrode Cables](https://shop.openbci.com/collections/frontpage/products/emg-ecg-snap-electrode-cables?variant=32372786958)
4. Computer with downloaded OpenBCI [GUI](Software/OpenBCISoftware/01-OpenBCI_GUI.md)

## Step 1: Hardware Assembly.

Follow the EMG Getting Started [tutorial](GettingStarted/Biosensing-Setups/02-EMG-Setup.md) on this link to connect the electrodes to your body and the Cyton board, and read data from it using the OpenBCI GUI. For this tutorial, you will need to connect one of your arms to Channel 1 and Ground.

## Step 2: Software Setup.

Install Python version 2 or 3. [Here](https://www.geeksforgeeks.org/how-to-download-and-install-python-latest-version-on-linux/) is a useful tutorial to find out if Python is already installed on your computer and to install it. To use this program, you need the following Python packages installed:

- **pylsl** : use `pip install pylsl` from the command line to install it.
- **pyautogui** : use `pip install pyautogui` to install it.
- **brainflow**: use `pip install brainflow`.
- **numpy**: use `pip install numpy`.

## Step 3: Download and Run the Script.

The Python script will set up the Cyton board, read data from it, and analyze it to detect any spikes that correspond to muscle flexing. If a flex is detected and 100 milliseconds have passed since the last one, it will press the space bar, which will make the dinosaur jump. The threshold for the time between flexes can be modified as needed to avoid debouncing.

In this tutorial, we provide two alternative ways of processing the data to detect the peaks and encourage you to think of your own ways to do it. Get either the `chrome_dino_v1.py` or the `chrome_dino_v2.py` Python script from [here](https://github.com/evaesteban/brainflow/tree/games/games) by cloning the repository or copying the individual code file to a .py script. Once your board is connected, open a terminal and launch the script by running `python <script name> --serial-port /dev/ttyUSB0 --board-id 0` from the folder its stored in.

**Important:** If you are using a serial port other than /dev/ttyUSB0, replace it in the above command.

Once the script has launched, follow the instructions on the terminal. The script `chrome_dino_v1.py` removes the noise from the signal, squares it, and sets a threshold to detect the peaks. The script `chrome_dino_v2.py` denoises the signal and then uses a rolling window with normalization to detect the peaks.

**Important**: If you are using `chrome_dino_v1.py` and the mean value printed out is negative, swap the N and P electrode cables and repeat calibration to get a positive mean.

Next, open a Google Chrome tab and go to the url `chrome://dino`. You do not have to disable your internet to access this free game. Start the game by pressing the spacebar or flexing your arm. Every time you flex, the dinosaur will jump. Since we’re processing raw signals, the threshold might need to be adjusted. If the jump is not getting triggered, play with the value of `flex_thres` by modifying the variable directly in `chrome_dino_v2.py` or the percentage multiplier set to 0.5 in `chrome_dino_v1.py`. You can also modify the time between flexes by changing the parameter `time_thres`.

To learn more about brainflow visit its [GitHub repository](https://github.com/brainflow-dev/brainflow) and its [Documentation](https://brainflow.readthedocs.io/en/stable/).

This is a great example to get started with brainflow. Try it out and send us a video of how you modify this prototype!

**Note**: This tutorial is based on Brainflow 2020. If you experience any issues with the latest versions email us at [contact@openbci.com](mailto:contact@openbci.com).
---
id: EMG_Chrome_Dino_Game
title: EMG Chrome Dino Game
---
In this tutorial we will show you how to play the Google Chrome Dinosaur Game without touching your laptop. To do that, we will read EMG data from your arm muscles and find the peaks which correspond to flexing, using them to trigger a jump of the dinosaur.
Check out an example video of this tutorial being put into action!
![EMGdinogif](https://media.giphy.com/media/Iyxb0WAiUUvffbg3mV/giphy.gif)
The following instructions have been written for use with Linux 16.04.
## Materials Required
1. OpenBCI [Cyton Board](https://shop.openbci.com/collections/frontpage/products/cyton-biosensing-board-8-channel?variant=38958638542)
2. [Solid Gel Electrodes](https://shop.openbci.com/products/kendall-emg-ecg-foam-solid-gel-electrodes-50-pack) or [IDUN Dryodes](https://shop.openbci.com/collections/frontpage/products/idun-dryode-kit)
3. [EMG/ECG Snap Electrode Cables](https://shop.openbci.com/collections/frontpage/products/emg-ecg-snap-electrode-cables?variant=32372786958)
4. Computer with downloaded OpenBCI [GUI](Software/OpenBCISoftware/01-OpenBCI_GUI.md)
## Step 1: Hardware Assembly.
Follow the EMG Getting Started [tutorial](GettingStarted/Biosensing-Setups/02-EMG-Setup.md) on this link to connect the electrodes to your body and the Cyton board, and read data from it using the OpenBCI GUI. For this tutorial, you will need to connect one of your arms to Channel 1 and Ground.
## Step 2: Software Setup.
Install Python version 2 or 3. [Here](https://www.geeksforgeeks.org/how-to-download-and-install-python-latest-version-on-linux/) is a useful tutorial to find out if Python is already installed on your computer and to install it. To use this program, you need the following Python packages installed:
- **pylsl** : use `pip install pylsl` from the command line to install it.
- **pyautogui** : use `pip install pyautogui` to install it.
- **brainflow**: use `pip install brainflow`.
- **numpy**: use `pip install numpy`.
## Step 3: Download and Run the Script.
The Python script will set up the Cyton board, read data from it, and analyze it to detect any spikes that correspond to muscle flexing. If a flex is detected and 100 milliseconds have passed since the last one, it will press the space bar, which will make the dinosaur jump. The threshold for the time between flexes can be modified as needed to avoid debouncing.
In this tutorial, we provide two alternative ways of processing the data to detect the peaks and encourage you to think of your own ways to do it. Get either the `chrome_dino_v1.py` or the `chrome_dino_v2.py` Python script from [here](https://github.com/evaesteban/brainflow/tree/games/games) by cloning the repository or copying the individual code file to a .py script. Once your board is connected, open a terminal and launch the script by running `python <script name> --serial-port /dev/ttyUSB0 --board-id 0` from the folder its stored in.
**Important:** If you are using a serial port other than /dev/ttyUSB0, replace it in the above command.
Once the script has launched, follow the instructions on the terminal. The script `chrome_dino_v1.py` removes the noise from the signal, squares it, and sets a threshold to detect the peaks. The script `chrome_dino_v2.py` denoises the signal and then uses a rolling window with normalization to detect the peaks.
**Important**: If you are using `chrome_dino_v1.py` and the mean value printed out is negative, swap the N and P electrode cables and repeat calibration to get a positive mean.
Next, open a Google Chrome tab and go to the url `chrome://dino`. You do not have to disable your internet to access this free game. Start the game by pressing the spacebar or flexing your arm. Every time you flex, the dinosaur will jump. Since we’re processing raw signals, the threshold might need to be adjusted. If the jump is not getting triggered, play with the value of `flex_thres` by modifying the variable directly in `chrome_dino_v2.py` or the percentage multiplier set to 0.5 in `chrome_dino_v1.py`. You can also modify the time between flexes by changing the parameter `time_thres`.
To learn more about brainflow visit its [GitHub repository](https://github.com/brainflow-dev/brainflow) and its [Documentation](https://brainflow.readthedocs.io/en/stable/).
This is a great example to get started with brainflow. Try it out and send us a video of how you modify this prototype!
**Note**: This tutorial is based on Brainflow 2020. If you experience any issues with the latest versions email us at [contact@openbci.com](mailto:contact@openbci.com).
Loading
Loading