Skip to content
/ dl-myo Public

Yet another MyoConnect alternative without dongles

License

Notifications You must be signed in to change notification settings

iomz/dl-myo

Repository files navigation

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)