Giter Club home page Giter Club logo

node-metawear's Introduction

Hi there, I'm brainexe ๐Ÿ‘‹

brainexe's github stats

node-metawear's People

Contributors

alanhortz avatar brainexe avatar

Stargazers

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

Watchers

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

node-metawear's Issues

Problem running the example

I'm on a chromebook pixel running ubuntu trusty 14.4 under crouton which should have access to the full bluetooth stack etc.. After installing all of the libraries etc. I tried running the all example and it hangs without any output on the screen (no logs etc). Any ideas about what might be happening?

Streaming throughput slows after a few seconds

I'm running your example accelerometer code on a MBP, and it streams wonderfully at first. However, after a few seconds, the stream noticeably slows down and I get maybe two updates a second, instead of the flurry of updates that I get at the beginning. If disconnect and reset, I again get the great stream throughput but always get the slowdown afterwards.

Warnings/error about running as root

Greetings,

Just found this from this mbient forum post. I started my bluetooth service with systemd and successfully connected to my MetaWear CPro via bluetoothctl. When I run DEBUG="noble-device" node examples/all.js, I get these errors:

$ DEBUG="noble-device" node examples/all.js
noble warning: adapter state unauthorized, please run as root or with sudo
               or see README for information on running without root/sudo:
               https://github.com/sandeepmistry/noble#running-on-linux

If I run with sudo or as root, I get nothing. I know ~0 about bluetooth communication so I'm a bit lost about what to do! Thanks for any pointers.

Further configuration for accelerometer

There are further methods for configurate the accelerometer:

  • TAP_CONFIG
  • ORIENT_CONFIG
  • FLAT_CONFIG
  • LOW_HIGH_G_CONFIG

Right now, the default values are send only. It would be fine to create a configuration interface like the Android SDK

Here is the Java reference code

Using accelerometer and GPIO at the same time

I have some code that sets and clears a GPIO pin every second (in a setInterval timer). While I'm doing that I'd like to also use the accelerometer (using accelerometer.onChange), and based on the values I receive (in particular whether there is enough movement), disable the setInterval timer. However, it doesn't seem to work. The accelerometer.onChange fires as expected, and the setInterval timer loops as expected, but the gpio.setDigitalOut and gpio.clearDigitalOut commands don't work within the timer block. It appears that the first gpio.setDigitalOut works, but that's it. When I comment out the accelerometer code, the timer works just fine with gpio.setDigitalOut and gpio.clearDigitalOut.

I also tried this manually using the mbientlab sample iOS app (started the accelerometer streaming, then set a GPIO pin), and it sets the pin very briefly then disconnects.

So is it possible to do what I'm trying?

Unable to read logs using the built in logging module

My first problem is:

  1. I am trying to read the logs for accelerometer using the logging module but it is not able to read them using downloadLog function. I am trying to use a callback function but doesn't go through all the event.emitter listeners.

  2. I am also facing an issue while running the accelerometerLog.js module, it gives me an warning, but not sure if it is relevant to the first issue: (node:11995) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 write listeners added. Use emitter.setMaxListeners() to increase limit.

cannot run examples

noble-device start +0ms
discovered device unknown
/Users/felipecocco/Downloads/node-metawear-master/examples/accelerometer.js:14
device.onSetup(function(error) {
^
TypeError: undefined is not a function
at /Users/felipecocco/Downloads/node-metawear-master/examples/accelerometer.js:14:12
at EventEmitter.onDiscover (/Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/lib/util.js:76:9)
at EventEmitter.emit (events.js:107:17)
at Noble.constructor.onDiscover (/Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/lib/util.js:30:29)
at Noble.emit (events.js:107:17)
at Noble.onDiscover (/Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/node_modules/noble/lib/noble.js:152:10)
at emit (events.js:118:17)
at null. (/Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/node_modules/noble/lib/mac/yosemite.js:188:12)
at /Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/node_modules/noble/lib/mac/uuid-to-address.js:22:5
at tryParseBuffer (/Users/felipecocco/Downloads/node-metawear-master/node_modules/noble-device/node_modules/noble/node_modules/bplist-parser/bplistParser.js:25:5)

Getting error cannot read property on for undefined.

This is on the latest version of rasberrian for the Rasberry Pi.

sudo DEBUG="noble-device" node node_modules/node-metawear/examples/all.js
noble-device start +0ms
were connected!
/home/pi/code/mbient/node_project/node_modules/node-metawear/src/registers/data-processing.js:38
this.emitter.on([MODULE_OPCODE, NOTIFY], function(buffer) {
^

TypeError: Cannot read property 'on' of undefined
at new DataProcessing (/home/pi/code/mbient/node_project/node_modules/node-metawear/src/registers/data-processing.js:38:17)
at /home/pi/code/mbient/node_project/node_modules/node-metawear/examples/all.js:19:31
at null._onTimeout (/home/pi/code/mbient/node_project/node_modules/node-metawear/src/device.js:43:17)
at Timer.listOnTimeout (timers.js:92:15)

Trouble with npm install of metawear-sdk-javascript package on windows 10

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v6.11.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: make OPT_FLAGS=-Wno-strict-aliasing -C MetaWear-SDK-Cpp/ -j
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script 'make OPT_FLAGS=-Wno-strict-aliasing -C MetaWear-SDK-Cpp/ -j'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the metawear package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! make OPT_FLAGS=-Wno-strict-aliasing -C MetaWear-SDK-Cpp/ -j
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs metawear
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls metawear
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\webinar\MetaWear-SDK-JavaScript\npm-debug.log

EventEmitter - Potential memory leak

The following issue has been observed when the accelerometer example is executed on a MacOS device.

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 write listeners added. Use emitter.setMaxListeners() to increase limit

Next step : Confirm the same kind of problem occurs on Linux based OS.

Gyro & Accelerometer stops sending data until soft reset

I have implemented the connection parameter support, apparently applying a 7.5ms max connection interval could. This could also vary depending the underlying hardware.

I need some help, would you please share any experience report that might help ?

Thanks,

Alan

PS : See this related thread on mbientlab community forum.

Not connecting on mac

Running nodejs 5.4.1 on mac OSX 10.11 bluetooth 4.4 switched on but seems like it is not connecting with Metawear. Am I missing any configuration ? I just cloned the project and followed the steps as mentioned for mac.

service uuid 326a900085cb9195d9dd464cfbbae75a not found

Hi,
I am running a simple code to blink led, it works fine but after running it for four five times, I'm getting the following error. I am running this code on nitrogen 3.10.17-37-boundary-4j3 device with SMP Debian 3.10.17-37.37 running in it

/home/debian/node-metawear-master/src/device.js:38
if (err) throw err;
^

Error: service uuid 326a900085cb9195d9dd464cfbbae75a not found!
at NobleDevice.notifyCharacteristic (/home/debian/node_modules/noble-device/lib/noble-device.js:112:21)
at /home/debian/node-metawear-master/src/device.js:37:10
at . (/home/debian/node_modules/noble-device/lib/noble-device.js:71:14)
at Peripheral. (/home/debian/node_modules/noble-device/node_modules/noble/lib/peripheral.js:38:7)
at Peripheral.g (events.js:286:16)
at emitOne (events.js:96:13)
at Peripheral.emit (events.js:188:7)
at Peripheral.connect (/home/debian/node_modules/noble-device/node_modules/noble/lib/peripheral.js:43:10)
at NobleDevice.connect (/home/debian/node_modules/noble-device/lib/noble-device.js:35:20)
at NobleDevice.connectAndSetUp.NobleDevice.connectAndSetup (/home/debian/node_modules/noble-device/lib/noble-device.js:69:8)

Please help.

Accelerometer: Implement correct scaling

The metawear device supports g-ranges for 2 to 16g. The default is 2g.
Depending on this range, we have to scale the result to the correct output value.
The current range is stored in "accRange"

The reference values can be found in the java source

Question On Creating onStep function in Register

Hello, first of all thank you for creating this module, it has been very useful for me. Pardon my lack of knowledge because a lot of this is still new to me, but I would love to learn more.

I am attempting to create an onStep function for the accelerometer that would utilize the constants you have in the accelerometer.js register file,

STEP_DETECTOR_INTERRUPT_ENABLE = 0x17;
STEP_DETECTOR_CONFIG    = 0x18;
STEP_DETECTOR_INTERRUPT = 0x19;
STEP_COUNTER_DATA       = 0x1a;
STEP_COUNTER_RESET      = 0x1b;

Attempting to emulate the code you have now on the onChange function, I wrote a function

Accelerometer.prototype.onStep = function (callback) {
    this.device.emitter.on( [MODULE_OPCODE, STEP_DETECTOR_INTERRUPT], function(buffer){
        callback();
    });
}

Ands added to the start function

    buffer = new Buffer(3);
    buffer[0] = MODULE_OPCODE;
    buffer[1] = STEP_DETECTOR_CONFIG;
    buffer[2] = 0x00;
    this.device.send(buffer);

When I write into the example accelerometer.js file,

accelerometer.onStep(function(){
     console.log("Test");
 })

I don't get an error but I also don't get anything console log. I am certain I am not understanding how buffers and MODULE_OPCODE work. Could you please help?

Improve the data type returned by the accelerometer and Gyro

Instead of returning a anonymous data structure, it should be better to return a typed data object like a CartesianFloat as an argument to the onChange listener on accelerometer and gyroscope registers.

The CartesionFloat object along withe CorrectedCartesianFloat, Quaternion and EulerAngle are planned to be available in release 0.3.6 in src/registers.core.js

Question Regarding Heart Rate Sensor

Great stuff, and thanks for putting together such an awesome library. I know you're in the process of expanding the register and was wondering any word on when that will happen? I wanted to be able to add a Heart Rate Sensor, similar to the app they created here. I was trying to use the GPIO, but it seems a little over my head. Any feedback and direction would be greatly appreciated. Thanks in advance for the help.

difficulty discovering more than one MetaMotion R at a time

Hello again -

I'm on a MBP running Yosemite 10.10.5, attempting to discover 4 MetaMotion Rs near me, so that I can attach one on each limb. I'm having trouble discovering more than one at a time, however, which limits my intended application of having these on dancers. I know they're all discoverable, since through the mobile app I can connect to each one individually. The firmware on the devices are all up-to-date.

HW versions: 0.1
FW versions: 1.3.3

Any ideas what might be causing the issue?

range error on example

I'm using Raspberry Pi.

pi@raspberrypi:~/work/node_metawear/node-metawear $ DEBUG="noble-device" node examples/all.js
noble-device start +0ms
discovered device f3:5b:f2:a4:19:27
were connected!
noble-device +1s send LED <Buffer 02 03 02 02 10 01 e8 03 f4 01 e8 03 c4 09 00 00 14>
noble-device +7ms send LED <Buffer 02 01 02>
noble-device +3ms send GPIO <Buffer 05 0b 00>
noble-device +0ms send GPIO <Buffer 05 0b 01>
noble-device +1ms send GPIO <Buffer 05 0b 02>
noble-device +1ms send LOGGING <Buffer 0b 0b 00>
noble-device +0ms send LOGGING <Buffer 0b 01 01>
noble-device +2ms send LOGGING <Buffer 0b 0d 01>
noble-device +1ms send LOGGING <Buffer 0b 07 01>
noble-device +0ms send LOGGING <Buffer 0b 08 01>
noble-device +1ms sendRead LOGGING <Buffer 0b 84>
noble-device +0ms sendRead LOGGING <Buffer 0b 85>
noble-device +2ms send DATA_PROCESSOR <Buffer 09 03 01>
noble-device +0ms send DATA_PROCESSOR <Buffer 09 07 02 01>
noble-device +1ms send MECHANICAL_SWITCH <Buffer 01 01 01>
noble-device +1ms sendRead TEMPERATURE <Buffer 04 81 00>
noble-device +4ms sendRead SETTINGS <Buffer 11 81>
noble-device +2ms send AMBIENT_LIGHT <Buffer 14 03 01>
noble-device +0ms send AMBIENT_LIGHT <Buffer 14 01 01>
noble-device +2ms send BAROMETER <Buffer 12 03 00 c0>
noble-device +1ms send BAROMETER <Buffer 12 01 01>
noble-device +0ms send BAROMETER <Buffer 12 04 01 00>
noble-device +1ms send BAROMETER <Buffer 12 04 01 00>
Firmware: 1.2.3
Hardware revision: 0.2
Battery: 100

buffer.js:582
throw new RangeError('Trying to access beyond buffer length');
^
RangeError: Trying to access beyond buffer length
at checkOffset (buffer.js:582:11)
at Buffer.readInt32LE (buffer.js:743:5)
at Function.Log.getLoggingTick (/home/pi/work/node_metawear/node-metawear/src/registers/log.js:237:26)
at EventEmitter. (/home/pi/work/node_metawear/node-metawear/src/registers/log.js:101:31)
at EventEmitter.emit (/home/pi/work/node_metawear/node-metawear/node_modules/eventemitter2/lib/eventemitter2.js:354:22)
at Device._onRead (/home/pi/work/node_metawear/node-metawear/src/device.js:53:18)
at Characteristic.emit (events.js:98:17)
at Noble.onRead (/home/pi/work/node_metawear/node-metawear/node_modules/noble-device/node_modules/noble/lib/noble.js:290:20)
at emit (events.js:106:17)
at NobleBindings.onNotification (/home/pi/work/node_metawear/node-metawear/node_modules/noble-device/node_modules/noble/lib/hci-socket/bindings.js:390:8)

Accelerometer/Gyro buffer hanging after initialization

Hello,

Thanks for the great tutorial, it is really helpful.

When I ran all.js, accelerometer.js and gyro.js for the first time, I had no issues at all. In fact, accelerometer.js and gyro.js were sending values at very high speeds. However, an hour later I tried them again and this is what I'm getting before it hangs:

Accelerometer
noble-device start +0ms
discovered device d4:ef:5d:73:8f:fe
were connected!
Start accelerometer with 50hz ang +-2g
noble-device send LOGGING <Buffer 0b 0b 00> +939ms
noble-device send LOGGING <Buffer 0b 01 01> +2ms
noble-device send ACCELEROMETER <Buffer 03 03 27 03> +0ms
noble-device send ACCELEROMETER <Buffer 03 04 01> +0ms
noble-device send ACCELEROMETER <Buffer 03 02 01 00> +0ms
noble-device send ACCELEROMETER <Buffer 03 0d 04 0a> +0ms
noble-device send ACCELEROMETER <Buffer 03 0a 00 14 14 14> +0ms
noble-device send ACCELEROMETER <Buffer 03 03 27 03> +0ms
noble-device send ACCELEROMETER <Buffer 03 07 07 30 81 0b c0> +1ms
noble-device send ACCELEROMETER <Buffer 03 01 01> +0ms

Gyroscope
were connected!
noble-device send GYRO <Buffer 13 03 0c 04> +1s
noble-device send GYRO <Buffer 13 02 01 00> +1ms
noble-device send GYRO <Buffer 13 03 0c 04> +1ms
noble-device send GYRO <Buffer 13 01 01> +0ms
noble-device send GYRO <Buffer 13 05 01> +0ms

all.js is still updating albeit slower, but it seems like the individual sensors are hanging. Any ideas why?

I would appreciate your feedback, thanks!!!

BTW: I'm running it on Ubuntu 16.04 LTS using a metamotion_R.

sensorFusion quaternion example does not produce values

So happy to find this library! Thank you for putting it together.

I am having trouble running the quaternion example with my Metamotion R unit. I don't have any error raised, but the data streamed are all 0s. Is the code snippet in /examples known to work at this point? The other supported examples seem to work fine.

node-metawear receives SENSORFUSION + GYRO, even if not explicitly

Hello again -

I have been attempting to do some framerate tests with a MetaMotion R. I was finding that if I streamed the magnetometer, gyro, accelerometer, and quaternions via sensorfusion, the framerate is actually quite slow (~2Hz). Stripping out everything except the accelerometer still yields a very slow rate.

So I decided to try one of the example scripts to debug my logic, running the snippet below. I'm a bit confused, however - is it the case that node-metawear is always receiving the sensorfusion & gyro as well, even if not explicitly subscribed?

hamilton.local$ DEBUG="noble-device" node examples/accelerometer.js
  noble-device start +0ms
discovered device  d2:8e:1e:ef:a8:e4
were connected!
Start accelerometer with 50hz ang +-2g
  noble-device  send LOGGING <Buffer 0b 0b 00> +5s
  noble-device  send LOGGING <Buffer 0b 01 01> +3ms
  noble-device  send ACCELEROMETER <Buffer 03 03 27 03> +1ms
  noble-device  send ACCELEROMETER <Buffer 03 04 01> +0ms
  noble-device  send ACCELEROMETER <Buffer 03 02 01 00> +0ms
  noble-device  send ACCELEROMETER <Buffer 03 01 01> +1ms
x: 0.09228515625 		y: -0.021728515625 		z: 1.03826904296875
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e8 05 9c fe 73 42> +10ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 02 00 04 00> +14ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +30ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 02 00 04 00> +0ms
x: 0.092041015625 		y: -0.02227783203125 		z: 1.0390625
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e4 05 93 fe 80 42> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 04 00> +0ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 f9 ff 02 00 04 00> +1ms
x: 0.09246826171875 		y: -0.0216064453125 		z: 1.04046630859375
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 eb 05 9e fe 97 42> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 04 00> +0ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +71ms
  noble-device  received MAGNETOMETER 5 <Buffer 15 05 a7 00 8a 01 c3 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 05 00> +73ms
x: 0.0927734375 		y: -0.0211181640625 		z: 1.038818359375
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 f0 05 a6 fe 7c 42> +496ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 02 00 05 00> +0ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 f9 ff 02 00 05 00> +370ms
x: 0.092041015625 		y: -0.02081298828125 		z: 1.03839111328125
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e4 05 ab fe 75 42> +619ms
  noble-device  received GYRO 5 <Buffer 13 05 fb ff 01 00 04 00> +247ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 00 00 05 00> +0ms
x: 0.09161376953125 		y: -0.02374267578125 		z: 1.0400390625
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 dd 05 7b fe 90 42> +247ms
  noble-device  received GYRO 5 <Buffer 13 05 f8 ff 00 00 04 00> +0ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 03 00> +1ms
x: 0.092529296875 		y: -0.0223388671875 		z: 1.0406494140625
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 ec 05 92 fe 9a 42> +122ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 03 00 05 00> +1ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +618ms
  noble-device  received GYRO 5 <Buffer 13 05 f9 ff 01 00 04 00> +1ms
x: 0.092041015625 		y: -0.02154541015625 		z: 1.03955078125
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e4 05 9f fe 88 42> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 04 00> +2ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +0ms
  noble-device  received MAGNETOMETER 5 <Buffer 15 05 62 00 90 01 bd 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fb ff 02 00 04 00> +120ms
x: 0.0916748046875 		y: -0.02142333984375 		z: 1.04052734375
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 de 05 a1 fe 98 42> +371ms
  noble-device  received GYRO 5 <Buffer 13 05 fc ff 01 00 06 00> +1ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fb ff 03 00 05 00> +1ms
x: 0.09185791015625 		y: -0.02288818359375 		z: 1.0380859375
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e1 05 89 fe 70 42> +0ms
  noble-device  received MAGNETOMETER 5 <Buffer 15 05 62 00 8a 01 99 00> +122ms
x: 0.092529296875 		y: -0.02239990234375 		z: 1.03924560546875
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 ec 05 91 fe 83 42> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 02 00 06 00> +1ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 03 00> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 05 00> +1ms
x: 0.0914306640625 		y: -0.02154541015625 		z: 1.03900146484375
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 da 05 9f fe 7f 42> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fa ff 01 00 05 00> +0ms
  noble-device  received SENSORFUSION 7 <Buffer 19 07 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00> +0ms
  noble-device  received GYRO 5 <Buffer 13 05 f9 ff 01 00 04 00> +615ms
x: 0.09228515625 		y: -0.0220947265625 		z: 1.03936767578125
  noble-device  received ACCELEROMETER 4 <Buffer 03 04 e8 05 96 fe 85 42> +1ms
  noble-device  received GYRO 5 <Buffer 13 05 fb ff 00 00 03 00> +0ms

Multiple MetaWear

Hi,

Is it possible to discover and connect multiple metawear devices at one go?

Thank you!

OutputDataRate question

I've noticed the accelerometer.js example supports specifying different output rates and range; however, the output rate doesn't seem to have an impact on the rate accelerometer data is posted to the console. Am I misinterpreting the meaning of this? Is setOutputDataRate known to work?

Thanks

Toggle Accelerometer?

I'm trying to toggle the accelerometer by using the switch ... and while I can turn it on the first press, the subsequent presses do not register it seems.

Does accelerometer turn off switch registration somehow? The default Android app does not see to have that issue.

Thanks for all your work.

Sensor fusion does not produce any value

I am having trouble running the quaternion example with my Metamotion R unit. I don't have any error raised, but the data streamed are all 0s. Is the code snippet in /examples known to work at this point? The other supported examples seem to work fine.I would appreciate if you could help please

getDeviceName may not be addressed properly

I'm having trouble accessing the device name with a MetaMotion R. Below is a small snippet that demonstrates the issue:

var devices = require("node-metawear");

var activeDevices = {};

devices.discover(function(device){
    activeDevices[device.id] = {};
    activeDevices[device.id].device = device;
    console.log('hello!')
    var settings = new device.Settings(device).getDeviceName(function(name){
        console.log('device name', name);
        activeDevices[device.id].name = name;
    })
})

And I get the following error error while sending data: [Error: service uuid 326a900085cb9195d9dd464cfbbae75a not found!] <Buffer 11 81> .

Is this functionality in-place at this point?

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.