Giter Site home page Giter Site logo

myojs-flex's Introduction

myojs-flex

North (formerly Thalmic Labs), the creator of the Myo armband, was acquired by Google in June 2020. Myo sales ended in October 2018 and Myo software, hardware and SDKs are no longer available or supported. Learn more.

A plugin for Myo.js that emits muscle flex strength and detects if the arm is flexed.

See it in action here (requires a myo!)

Whenever the Myo sends EMG events flex.myo.js will emit a flex_strength event with a number between 0 and 1.

It will also emit a arm_flex or a arm_unflex emit if the flex strength passes a certain threshold. This will also set a boolean, myo.isArmFlexed which you can check.

We detect if the arm is flexed based on some parameters, you can control them like so

Myo.plugins.flex = {
	threshold     : 0.4, //What flex strength we considered to be 'flexed'
	timeout       : 150, //Milliseconds after flexing that we send the event
	emgResolution : 10   //How many EMG datasets we use to smooth the data
};

Note: The flex dectection is highly dependant on the threshold and resoltuion set. I picked numbers that worked for me, but feel free to experiment :)

applications

Flex detection is useful for reducing false positive on certain events. It's currently being used in myo.snap.js to make sure the user was actually snapping and not just bumped their hand.

The flex strength is useful to detect how strong a gesture is. By picking thresholds, you could use this to differentiate between a 'light fist' and a 'hard fist'.

Check out the demo for an example of how to use it.

myojs-flex's People

Contributors

stolksdorf avatar

Stargazers

Timothy Stewart avatar samy kamkar avatar N. Daliot avatar

Watchers

James Cloos avatar Scott Greenberg avatar Bruce Bock avatar Mark DiFranco avatar N. Daliot avatar

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.