Giter Site home page Giter Site logo

myonodebluetooth's Introduction

MYO Bluetooth communication library

A bluetooth communication library for the myo armband, using Node and Noble and written in Javascript. It doesn't require the Myo Connect software or the Myo SDK, but communicates directly over bluetooth by using the released bluetooth spec.

For a demo build with this library, see https://www.youtube.com/watch?v=R19rKXpttjY The demo application will be published later.

Install

This library uses Noble v0.3.8, which currently only supports Mac OS X and Linux. Checkout Noble to find out it's prerequisites and installation guidance.

I have not yet published this repository on npm, but will do eventually. Install via npm:

npm install git://github.com/manueloverdijk/myonodebluetooth.git

As the project is written with some of the new javascript features of ES6, compile the project with traceur or use io.js with the following flags:

--use_strict --es_staging --harmony_classes --harmony_arrow_functions

Usage

The following is an example which starts discovering myo armbands and connects to the first available armband. Wait for the ready event after calling initStart() before reading and writing to characteristics of the Myo.

var MyoBluetooth  = require('MyoNodeBluetooth');
var MyoAgent = new MyoBluetooth();


MyoAgent.on('discovered', function(armband){
    armband.on('connect', function(connected){
    
    	// armband connected succesfully
        if(connected){
            // discover all services/characteristics and enable emg/imu/classifier chars
        	this.initStart();
    	} else {
    	  // armband disconnected
   		}

	});
    
    // Armband receives the ready event when all services/characteristics are discovered and emg/imu/classifier mode is enabled
    armband.on('ready', function(){
    
    	// register for events
        armband.on('batteryInfo',function(data){
        	console.log('BatteryInfo: ', data.batteryLevel);
        });
        
        // read or write data from/to the Myo
        armband.readBatteryInfo();
    });
    
   armband.connect();
});

Supported features

Agent

Get notified of newly discovered Myo armbands.

Agent.on('discovered', function(armband){
 ...
});

Get notified of bluetooth adapter state changes, see Noble for more information.

Agent.on('stateChange', function(state){
 ...
});

Armband

Discover all services/characteristics and enable the EMG, IMU and Classifier Characteristics to notify/indicate the communicator of new events. The Myo will also be set in no sleep mode and unlocked until disconnection.

Armband.initStart();

Wait for the ready event after calling initStart(), after which the Myo is ready to read/write and notify characteristics.

Armband.on('ready', function(){
...    
})

Reading characteristics

EMG data

Get notified of EMG data (which the Myo sends after calling initStart())

/* 
data = {
	sample1: Array[8],
	sample2: Array[8]
} 
*/
Armband.on('emg', function(data){

 	...
});
Orientation data

Get notified of orientation data (which the Myo sends after calling initStart())

/* 
data = {
	w, x, y, z
} 
*/
Armband.on('orientation', function(data){
 	...
});
Accelerometer data

Get notified of accelerometer data (which the Myo sends after calling initStart())

//data = Array[3]
Armband.on('accelerometer', function(data){
 	...
});
Gyroscope data

Get notified of gyroscope data (which the Myo sends after calling initStart())

//data = Array[3]
Armband.on('gyroscope', function(data){
 	...
});
Pose events

Get notified of pose events (which the Myo sends after calling initStart())

/* data = {
	type: rest | fist | waveIn | waveOut | spread | tap | unkown
} */
Armband.on('pose', function(data){
 	...
});
Sync events

Get notified of sync events (which the Myo sends after calling initStart())

// Synced true | false | failed
Armband.on('sync', function(Boolean){
 	...
});
Unlock events

Get notified of unlock events (which the Myo sends after calling initStart())

// Unlocked true | false
Armband.on('unlocked', function(Boolean){
 	...
});
Read info

Read the Myo info characteristic

Armband.on('info', function(data){
 	...
});
Armband.readInfo();
Read version

Read the Myo version characteristic

Armband.on('version', function(data){
 	...
});
Armband.readVersion();
Read batteryInfo

Read the Myo batteryinfo characteristic

// data: { batteryLevel }
Armband.on('batteryInfo', function(data){
 	...
});
Armband.readBatteryInfo();

Writing characteristics

Listen for the command event after executing a write command to the Myo to be notified on results/success

// data = {type, data} 
Armband.on('command', function(data){
 ...
});

Set the sleep mode

Armband.setSleepMode(Boolean); // Never sleep: true | false

Set the unlock mode

// mode:   0 -> unlock now and relock after lock command is recieved
//         1 -> re-lock immediatly
//         2 ->  unlock now and relock after a fixed timeout

Armband.setUnlockMode(mode);

Set the user action mode, to notify the user that an action has been recognized / confirmed.

Armband.setUserAction();

Set the IMU/EMG/Classifier modes to notify/indicate the communicator for data events

Armband.setMode();

Set the vibrate command

// mode:   0 -> Do not vibrate.
//         1 -> Vibrate for a short amount of time
//         2 -> Vibrate for a medium amount of time
//		   3 -> Vibrate for a long amount of time

Armband.vibrate(mode)

TODO

  • Normalize the gyroscope/accelerometer data, calculate Euler Angles
  • Implement extended vibrate command
  • Refactor initStart service/characteristic discovery
  • Refactor some functions of the deserialisation class
  • Fix the unresponsive-classifier state which Myo enters after unsyncing while emitting Classifier events over Bluetooth

myonodebluetooth's People

Contributors

drart avatar manueloverdijk avatar tjclement avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

myonodebluetooth's Issues

Basic use inquiry

Kind greetings @ManuelOverdijk , i'm currently trying to log the MYO's filtered EMG data at 200 Hz using a Raspberry Pi 3 and I came across your library.

I'm quite new to node.js, so I didn't understand how I must compile the project with traceur after installing noble and your library via npm afterwards.

Therefore, when I run the code sample shown in your usage section, it never manages to find the MYO and scans forever:

2017-04-20-141219_746x901_scrot

I'd be most grateful for your kind help. Sincerely,

GERMAN VARGAS
Research Assistant - Mechatronics Engineer
Nueva Granada Military University - Bogota, Colombia

error

npm install git://github.com/manueloverdijk/myonodebluetooth.git
npm ERR! code 1
npm ERR! path /Users/shahineskandari/node_modules/MyoNodeBluetooth/node_modules/noble
npm ERR! command failed
npm ERR! command sh -c node install.js
npm ERR! noble install: platform is "darwin'
npm ERR! noble install: installing xpc-connection ...
npm ERR! noble install: done
npm ERR! npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm WARN deprecated [email protected]: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm ERR! npm WARN deprecated [email protected]: No longer maintained
npm ERR! npm WARN deprecated [email protected]: Mocha v1.x is no longer supported.
npm ERR! npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm ERR! npm ERR! code 1
npm ERR! npm ERR! path /Users/shahineskandari/node_modules/MyoNodeBluetooth/node_modules/noble/node_modules/xpc-connection
npm ERR! npm ERR! command failed
npm ERR! npm ERR! command sh -c node-gyp rebuild
npm ERR! npm ERR! CXX(target) Release/obj.target/binding/src/XpcConnection.o
npm ERR! npm ERR! gyp info it worked if it ends with ok
npm ERR! npm ERR! gyp info using [email protected]
npm ERR! npm ERR! gyp info using [email protected] | darwin | arm64
npm ERR! npm ERR! gyp info find Python using Python version 3.9.10 found at "/Library/Frameworks/Python.framework/Versions/3.9/bin/python3"
npm ERR! npm ERR! gyp info spawn /Library/Frameworks/Python.framework/Versions/3.9/bin/python3
npm ERR! npm ERR! gyp info spawn args [
npm ERR! npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! npm ERR! gyp info spawn args '-f',
npm ERR! npm ERR! gyp info spawn args 'make',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/Users/shahineskandari/node_modules/MyoNodeBluetooth/node_modules/noble/node_modules/xpc-connection/build/config.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! npm ERR! gyp info spawn args '-I',
npm ERR! npm ERR! gyp info spawn args '/Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/common.gypi',
npm ERR! npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/shahineskandari/Library/Caches/node-gyp/16.14.1',
npm ERR! npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/shahineskandari/Library/Caches/node-gyp/16.14.1/<(target_arch)/node.lib',
npm ERR! npm ERR! gyp info spawn args '-Dmodule_root_dir=/Users/shahineskandari/node_modules/MyoNodeBluetooth/node_modules/noble/node_modules/xpc-connection',
npm ERR! npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! npm ERR! gyp info spawn args '--depth=.',
npm ERR! npm ERR! gyp info spawn args '--no-parallel',
npm ERR! npm ERR! gyp info spawn args '--generator-output',
npm ERR! npm ERR! gyp info spawn args 'build',
npm ERR! npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! npm ERR! gyp info spawn args ]
npm ERR! npm ERR! gyp info spawn make
npm ERR! npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! npm ERR! ../src/XpcConnection.cpp:26:77: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! npm ERR! target->Set(Nan::New("XpcConnection").ToLocalChecked(), tmpl->GetFunction());
npm ERR! npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:6802:46: note: 'GetFunction' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetFunction(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:26:11: error: no matching member function for call to 'Set'
npm ERR! npm ERR! target->Set(Nan::New("XpcConnection").ToLocalChecked(), tmpl->GetFunction());
npm ERR! npm ERR! ~~~~~~~~^~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:103:54: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! npm ERR! xpcObject = xpc_int64_create(value->IntegerValue());
npm ERR! npm ERR! ~~~~~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3101:40: note: 'IntegerValue' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe<int64_t> IntegerValue(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:103:17: error: no matching function for call to 'xpc_int64_create'
npm ERR! npm ERR! xpcObject = xpc_int64_create(value->IntegerValue());
npm ERR! npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! npm ERR! /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/xpc/xpc.h:591:1: note: candidate function not viable: no known conversion from 'Maybe<int64_t>' (aka 'Maybe') to 'int64_t' (aka 'long long') for 1st argument
npm ERR! npm ERR! xpc_int64_create(int64_t value);
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:113:49: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! npm ERR! Local valueObject = value->ToObject();
npm ERR! npm ERR! ~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3060:44: note: 'ToObject' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:113:19: error: no viable conversion from 'MaybeLocalv8::Object' to 'Localv8::Object'
npm ERR! npm ERR! Local valueObject = value->ToObject();
npm ERR! npm ERR! ^ ~~~~~~~~~~~~~~~~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocalv8::Object' to 'const v8::Localv8::Object &' for 1st argument
npm ERR! npm ERR! class Local {
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocalv8::Object' to 'v8::Localv8::Object &&' for 1st argument
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:204:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
npm ERR! npm ERR! V8_INLINE Local(Local that)
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:348:22: note: explicit constructor is not a candidate
npm ERR! npm ERR! explicit V8_INLINE Local(T* that) : val_(that) {}
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:115:78: error: too few arguments to function call, expected 2, have 1
npm ERR! npm ERR! if (valueObject->HasRealNamedProperty(Nan::New("isUuid").ToLocalChecked())) {
npm ERR! npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4250:37: note: 'HasRealNamedProperty' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe HasRealNamedProperty(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:115:9: error: value of type 'Maybe' is not contextually convertible to 'bool'
npm ERR! npm ERR! if (valueObject->HasRealNamedProperty(Nan::New("isUuid").ToLocalChecked())) {
npm ERR! npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! npm ERR! ../src/XpcConnection.cpp:123:49: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! npm ERR! Local valueObject = value->ToObject();
npm ERR! npm ERR! ~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3060:44: note: 'ToObject' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToObject(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:123:19: error: no viable conversion from 'MaybeLocalv8::Object' to 'Localv8::Object'
npm ERR! npm ERR! Local valueObject = value->ToObject();
npm ERR! npm ERR! ^ ~~~~~~~~~~~~~~~~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocalv8::Object' to 'const v8::Localv8::Object &' for 1st argument
npm ERR! npm ERR! class Local {
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocalv8::Object' to 'v8::Localv8::Object &&' for 1st argument
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:204:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
npm ERR! npm ERR! V8_INLINE Local(Local that)
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:348:22: note: explicit constructor is not a candidate
npm ERR! npm ERR! explicit V8_INLINE Local(T* that) : val_(that) {}
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:135:40: error: no matching member function for call to 'GetPropertyNames'
npm ERR! npm ERR! Local propertyNames = object->GetPropertyNames();
npm ERR! npm ERR! ~~~~~~~~^~~~~~~~~~~~~~~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4115:43: note: candidate function not viable: requires single argument 'context', but no arguments were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetPropertyNames(
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4117:43: note: candidate function not viable: requires at least 4 arguments, but 0 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetPropertyNames(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:138:48: error: no matching member function for call to 'Get'
npm ERR! npm ERR! Local propertyName = propertyNames->Get(i);
npm ERR! npm ERR! ~~~~~~~~~~~~~~~^~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4007:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4010:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:143:88: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! npm ERR! Local propertyValue = object->GetRealNamedProperty(propertyName->ToString());
npm ERR! npm ERR! ~~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3048:44: note: 'ToString' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:143:89: error: too few arguments to function call, expected 2, have 1
npm ERR! npm ERR! Local propertyValue = object->GetRealNamedProperty(propertyName->ToString());
npm ERR! npm ERR! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4278:43: note: 'GetRealNamedProperty' declared here
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal GetRealNamedProperty(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:143:20: error: no viable conversion from 'MaybeLocalv8::Value' to 'Localv8::Value'
npm ERR! npm ERR! Local propertyValue = object->GetRealNamedProperty(propertyName->ToString());
npm ERR! npm ERR! ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'MaybeLocalv8::Value' to 'const v8::Localv8::Value &' for 1st argument
npm ERR! npm ERR! class Local {
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:200:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'MaybeLocalv8::Value' to 'v8::Localv8::Value &&' for 1st argument
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:204:13: note: candidate template ignored: could not match 'Local' against 'MaybeLocal'
npm ERR! npm ERR! V8_INLINE Local(Local that)
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:348:22: note: explicit constructor is not a candidate
npm ERR! npm ERR! explicit V8_INLINE Local(T* that) : val_(that) {}
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:160:33: error: no matching member function for call to 'Get'
npm ERR! npm ERR! Local value = array->Get(i);
npm ERR! npm ERR! ~~~~~~~^~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4007:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:4010:43: note: candidate function not viable: requires 2 arguments, but 1 was provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:200:13: error: no matching member function for call to 'Set'
npm ERR! npm ERR! object->Set(Nan::New(key).ToLocalChecked(), XpcConnection::XpcObjectToValue(value));
npm ERR! npm ERR! ~~~~~~~~^~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:212:12: error: no matching member function for call to 'Set'
npm ERR! npm ERR! array->Set(Nan::New(index), XpcConnection::XpcObjectToValue(value));
npm ERR! npm ERR! ~~~~~~~^~~
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3961:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context,
npm ERR! npm ERR! ^
npm ERR! npm ERR! /Users/shahineskandari/Library/Caches/node-gyp/16.14.1/include/node/v8.h:3964:37: note: candidate function not viable: requires 3 arguments, but 2 were provided
npm ERR! npm ERR! V8_WARN_UNUSED_RESULT Maybe Set(Local context, uint32_t index,
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:254:12: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
npm ERR! npm ERR! Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../node_modules/nan/nan.h:1049:3: note: 'MakeCallback' has been explicitly marked deprecated here
npm ERR! npm ERR! NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../node_modules/nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! npm ERR! # define NAN_DEPRECATED attribute((deprecated))
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../src/XpcConnection.cpp:263:12: warning: 'MakeCallback' is deprecated [-Wdeprecated-declarations]
npm ERR! npm ERR! Nan::MakeCallback(Nan::New(this->This), Nan::New("emit").ToLocalChecked(), 2, argv);
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../node_modules/nan/nan.h:1049:3: note: 'MakeCallback' has been explicitly marked deprecated here
npm ERR! npm ERR! NAN_DEPRECATED inline v8::Localv8::Value MakeCallback(
npm ERR! npm ERR! ^
npm ERR! npm ERR! ../node_modules/nan/nan.h:108:40: note: expanded from macro 'NAN_DEPRECATED'
npm ERR! npm ERR! # define NAN_DEPRECATED attribute((deprecated))
npm ERR! npm ERR! ^
npm ERR! npm ERR! 2 warnings and 18 errors generated.
npm ERR! npm ERR! make: *** [Release/obj.target/binding/src/XpcConnection.o] Error 1
npm ERR! npm ERR! gyp ERR! build error
npm ERR! npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! npm ERR! gyp ERR! System Darwin 21.3.0
npm ERR! npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
npm ERR! npm ERR! gyp ERR! cwd /Users/shahineskandari/node_modules/MyoNodeBluetooth/node_modules/noble/node_modules/xpc-connection
npm ERR! npm ERR! gyp ERR! node -v v16.14.1
npm ERR! npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! npm ERR! gyp ERR! not ok
npm ERR!
npm ERR! npm ERR! A complete log of this run can be found in:
npm ERR! npm ERR! /Users/shahineskandari/.npm/_logs/2022-03-17T06_34_55_541Z-debug-0.log

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/shahineskandari/.npm/_logs/2022-03-17T06_34_46_820Z-debug-0.log

macbookpro m1

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.