LSM9DS0XM


The LSM9DS0XM uses magnetic and accelerometric sensors to detect 6 degrees of freedom.

For more information click here.

How To Connect

Cylon.robot({
  connections: {
    arduino: { adaptor: 'firmata', port: '/dev/tty.usbmodem1421' }
  },

  devices: {
    accel: { driver: 'lsm9ds0xm' }
  }
});

How To Use

var Cylon = require('cylon');

Cylon.robot({
  connections: {
    arduino: { adaptor: 'firmata', port: '/dev/tty.usbmodem1421' }
  },

  devices: {
    accel: { driver: 'lsm9ds0xm' }
  },

  work: function(my) {
    every((1).second(), function() {
      my.accel.getAccel(function(err, data) {
        console.log(data);
      });
    });
  }
}).start();

Commands

getAccel

Gets the value of Accelerometer.

Params

  • callback (Function) callback to be invoked with data

Returns

  • (undefined)

getMag

Gets the value of Magnetometer.

Params

  • callback (Function) callback to be invoked with data

Returns

  • (undefined)

Circuit

Compatibility