MPU6050


The MPU-6050 is a serious little piece of motion processing tech! By combining a MEMS 3-axis gyroscope and a 3-axis accelerometer on the same silicon die together with an onboard Digital Motion Processorâ„¢ capable of processing complex 9-axis MotionFusion algorithms, the MPU-6050 does away with the cross-axis alignment problems that can creep up on discrete parts.

For more information click here.

How To Connect

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

  devices: {
    mpu6050: { driver: 'mpu6050' }
  },
});

How To Use

var Cylon = require('cylon');

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

  devices: {
    mpu6050: { driver: 'mpu6050' }
  },

  work: function(my) {
    every((1).seconds(), function() {
      my.mpu6050.getMotionAndTemp(function(err, data) {
        console.log(data);
      });

    });
  }
}).start();

Commands

getAngularVelocity

Gets the value of the Angular Velocity

Params

  • callback (Function) function to be invoked with data

Returns

  • (undefined)

getAcceleration

Gets the value of the Acceleration

Params

  • callback (Function) function to be invoked with data

Returns

  • (undefined)

getMotionAndTemp

Gets the value of the Motion.

Params

  • callback (Function) function to be invoked with data

Returns

  • (undefined)

Circuit

The MPU6050 is a 3.3V device. Please note if you are using the Sparkfun version, you need to connect both the VDD and also the VIO to 3.3V power for it to work correctly.

Compatibility