read meta-motion R value via node.js on raspberry pi

hi

I want to read sensor value from a meta motion R via node.js which is installed on a raspberry pi 3.
After some calculations, Node.js is sending web-sockets.

I had this all working with some other sensor (a Sensortag from TI) but I changed to Meta motion R sensors because they had sensor-fusion on board for more accurate measuring. they work fine!!! 

I just read interesting information about this integration on:


from what I read I have to use:

Now my question:
The github files show how to read accelerometer and gyroscope value from a metawear sensor.
But I want also to read magnetometer and also euler / quaternion information. That is why I bought a meta motion R with on-board sensor fusion.

Do you have a suggestion how to read this magnetometer and euler/quaternion information?

Hope to hear.

gr markv


Comments

  • You will need to contact the NodeJS author regarding how to use his API.  As far as I can tell, he hasn't updated the API in a while so newer features, like sensor fusion, are not supported.

    Alternatively, if you are comfortable with using Noble, you could use the C++ API and build NodeJS wrappers around the functions and types you want to use.
  • Thanks eric. We will try your suggestion.

    But we will also try writing a C++ program although we are not so familiar with C++. Maybe you have a programm we can use as an example and change a bit. The case is simple.

    Connect to the metawear sensors
    Read magnetometer and accelerometer value 5 times a second
    Send the measured data 5 times a second via Websockets

    Do you by excedent have such a c++ program as basic so we can adjust to our needs?

    Hope you can help

    Gr markv
  • If you're building a Win10 app, you can base your app off of the C++ Template.
  • Hi,

    In collaboration with @markv, I have release a new version (v0.3.5) of the node.js library with a basic support for the BMM150 magnetometer. Still, the configuration of the sensor is not yet supported and planned for the next release.

    Apparently, @markv succeeded to stream the data from the sensor.

    Feel free to get back to me with test results.

    Alan


  • Sweet, thanks for the NodeJS update.
This discussion has been closed.