Skip to content

Gather sEMG/IMU data from Myo armbands, and obtain real time predictions.

Notifications You must be signed in to change notification settings

sebastiankmiec/PythonMyoLinux

Repository files navigation

PythonMyoLinux

This repository contains the following:

  1. A Python (3.5) package to collect sEMG and IMU measurements from Myo armband devices, featuring:
    1. An implementation of the Bluegiga API (BGAPI)
    2. Use of GAP and GATT client to:
      • Discover, and connect to devices
      • Search for and subscribe to available services
    3. Use of Myo specific commands

 

  1. A GUI demonstration
    1. Overall system image

    2. GUI tabs

      1. Data Collection image
      2. Online Training image
      3. Online Prediction image

 

The GUI demonstration currently supports up to two Myo armband devices over a BLED112 Bluetooth dongle(s), and is intended to be used on a Linux distribution.

The GUI allows for collection of data with (crude) ground truth, as well as online training/testing. For refining of ground truth, and offline training/testing, please see the NinaTools respository.

 

Setup & Usage

First install the pymyolinux package

git clone https://github.com/sebastiankmiec/PythonMyoLinux.git
cd PythonMyoLinux
pip install .

 

1. Pymyolinux package demonstration

conda install -c conda-forge pyserial -y
python pymyolinux_example.py

 

2. GUI demonstration

Install remaining dependencies (first setup the NinaTools respository)

conda install -c conda-forge/label/cf201901 pyqt=5.6.0 pyqtgraph=0.10.0 -y

Distribution specific steps (for CentOS 7 only), to allow video playback

yum install gstreamer1.x86_64 gstreamer1-libav.x86_64 gstreamer1-plugins-bad-freeworld.x86_64 gstreamer1-plugins-good.x86_64 
yes | cp /lib64/gstreamer-1.0/* /path_to_miniconda/envs/testnina/lib/gstreamer-1.0/

To finally run the GUI demonstration

python gui_demo/gui_main.py

 

References

  1. "Getting Started with Bluetooth Low Energy" by O'Reilly Media, Inc.
    • For a brief understanding of the Bluetooth stack, and Bluetooth core specification.
  2. https://www.silabs.com/products/wireless/bluetooth/bluetooth-low-energy-modules/bled112-bluetooth-smart-dongle
    • See "Bluetooth Smart Software API Reference Manual for BLE Version 1.7", to understand BGAPI.
  3. https://github.com/mjbrown/bgapi
    • A major inspiration for this work.
  4. https://github.com/thalmiclabs/myo-bluetooth
    • Contains Myo specific commands.

About

Gather sEMG/IMU data from Myo armbands, and obtain real time predictions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages