Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Brentbin/myo-python

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python bindings for the Myo SDK

This module is a ctypes based wrapper for the Thalmic Myo SDK that is compatible with Python 2 and 3. Check out the docs for a tutorial and the API documentation and the examples folder.

Features

  • Python 2 & 3 compatible
  • Math classes for Vector and Quaternion

Example

from time import sleep
from myo import init, Hub, DeviceListener

class Listener(DeviceListener):

    def on_pair(self, myo, timestamp, firmware_version):
        print("Hello, Myo!")

    def on_unpair(self, myo, timestamp):
        print("Goodbye, Myo!")

    def on_orientation_data(self, myo, timestamp, quat):
        print("Orientation:", quat.x, quat.y, quat.z, quat.w)

init()
hub = Hub()
hub.run(1000, Listener())
try:
    while True:
        sleep(0.5)
except KeyboardInterrupt:
    print('\nQuit')
finally:
    hub.shutdown()  # !! crucial

Requirements

  • six [required]

Projects that use myo-python


This project is licensed under the MIT License.
Copyright © 2015 Niklas Rosenstein

About

Python bindings for the Myo SDK

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.