npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

node-myo-edison

v1.0.0

Published

Myo BLE interface

Downloads

1

Readme

node-myo-edison

Control Myo Armband with node.js on your Intel Edison Board

Intel Edison Instructions

Instructions are availabe on instructables : http://www.instructables.com/id/MyoCraft-Myo-Armband-with-nodejs-on-Intel-Edison-B/

Prerequisites

Install noble see : https://github.com/sandeepmistry/noble

Usage

var myo = require('./myo.js');

CONNECT

Quick Connect

myo.quickConnect(function(err, id){
    console.log('myo unique id : ', id);
});

Classic Connect

myo.scan.start(function(err, data){
    console.log(err, data);
});
myo.event.on('ready', function(id){
    console.log('myo unique id : ', id);
});

DISCONNECT

myo.connected[id]..disconnect();

INITIATE

Initiate Myo to receive stream and data

myo.connected[id].unlock("hold", function() {
    // lock - time (will lock after inactivity) - hold
    myo.connected[id].sleepMode("forever", function () {
        // normal - forever (never sleep)
        myo.connected[id].setMode('send', 'all', 'enabled', function () {
            // emg : none - send - raw
            // imu : none - data - events - all - raw
            // classifier : enabled - disabled
            console.log('initiated');
        });
    });
});    

INTERACTION

Get Name

myo.connected[id].generic.getName(function (err, data){ // Get device name
    console.log(err, data);
});

Set Name

myo.connected[id].generic.setName('Myo NAME', function (err, data){ // Set device name
    console.log(err, data);
});

Battery Info

myo.connected[id].battery(function(err, data) {
    console.log("battery : " + data + " %"); // data => battery in percent
});

Vibrate Classic

myo.connected[id].vibrate("strong"); // light, medium, strong

Vibrate Custom

myo.connected[id].vibrate2(1500, 255); // time in milliseconds, power 0 - 255

Vibrate Notify

myo.connected[id].notify(); // notify :  short and light vibration

Deep Sleep

myo.connected[id].deepSleep(function(){}); // go into deep sleep

Basic Info

myo.connected[id].info(function(err, data){
    console.log(err, data);
});

Firmware Info

myo.connected[id].firmware(function(err, data){
    console.log(err, data);
});

STREAM

Set "true" to get stream on events or "false" to disable.

IMU

myo.connected[id].imu(true);

Classifier

myo.connected[id].classifier(true);

EMG

myo.connected[id].emg(true);

EVENTS

myo.event.on('discover', function(id){
    console.log('discover', id);
});
myo.event.on('connect', function(id){
    console.log('connect', id);
});
myo.event.on('disconnect', function(id){
    console.log('disconnect', id);
});
myo.event.on('ready', function(id){
    console.log('peripheral ready :', id);
});
myo.event.on('imu', function(data){
    console.log('imu', data);
});
myo.event.on('classifier', function(data){
    console.log('classifier', data);
});
myo.event.on('emg4', function(data){
    console.log('emg', data);
});