Code Monkey home page Code Monkey logo

dl-myo's Introduction

dl-myo (Dongle-less Myo)

build status image size codecov python versions pypi version license

dl-myo is yet another MyoConnect alternative for Myo Armband without an official Myo dongle.

If you are fed up with the dongle and still want to use Myo anyway (in Python), this is the right stuff to grab.

The GATT service naming convention reflects the official BLE specification for Myo (i.e., myohw.h); however, some services and characteristics differ for a uniform naming.

See myo/profile.py for more detail.

Features

Compared to other Myo libraries/SDKs:

  • Full-scratched in Python, no dependency from other runtime (e.g., the official cpp SDK)
  • Multi-platform support based on Bleak, instead of bluepy or pybluez
  • Stream EMG data (filtered/raw) and IMU data simultaneously using asyncio
  • A sample docker image provided -- runs just off the shelf

Platform Support

Linux Raspberry Pi macOS Windows

Install

pip install dl-myo

Examples

sample_client.py

The script scans a Myo device, connect to the device, prints the GATT profile from the device, collect EMG data for 5 seconds, and then disconnect.

Any Myo Armband should have the service UUID d5060001-a904-deb9-4748-2c7f4a124842.

python examples/sample_client.py

Otherwise, you can also bind to a specific MAC address. For example,

python examples/sample_client.py --mac D2:3B:85:94:32:8E

influxdb

The examples/influxdb/influx_client.py emits datapoints to be stored in InfluxDB. The docker-compose.yml lanches the required database for this by default.

docker compose up -d influxdb

then

python examples/influxdb/influx_client.py

Make use of the dashboard config examples/influxdb/myo.json.

influxdb

Try the example with Docker

NOTE: The docker example currently doesn't work on macOS.

docker compose pull
docker compose run --rm dl-myo

Build with Poetry

Install Poetry first.

poetry build

Credits

This project was first inspired by Dongleless-myo (originally created by @mamo91 and enhanced by @MyrikLD) which provides a great starting point using bluepy.

In addition to Myo Bluetooth Official Protocol, I would like to mention that the following resources on GitHub have been very helpful:

Author

@iomz (Iori Mizutani)

dl-myo's People

Contributors

iomz avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dl-myo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.