Skip to main content

Yet another MyoConnect alternative without dongles

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dl_myo-1.0.5.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

dl_myo-1.0.5-py3-none-any.whl (24.7 kB view details)

Uploaded Python 3

File details

Details for the file dl_myo-1.0.5.tar.gz.

File metadata

  • Download URL: dl_myo-1.0.5.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for dl_myo-1.0.5.tar.gz
Algorithm Hash digest
SHA256 e3365bb8f8fd81320092020b5882d2df4190c4eb135ecc1a9fc6210345a68149
MD5 fcf6f9c77303289048aa7e3a4178fb79
BLAKE2b-256 c7bea8f403691385cf51e4d20360fa97f9227d38097e8069e1f6df01f7ce5129

See more details on using hashes here.

File details

Details for the file dl_myo-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: dl_myo-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 24.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for dl_myo-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cbb8c7ae54f0c9cdb4a75747eab0e664161638c2367bf0cc629ba147ff0904a8
MD5 cc3d269d24ff42c5664806669c1c3d9d
BLAKE2b-256 7364e53af08a635b8c8a9e2e33cd88015e52ad8aac27856bd30b6c89302b81ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page