nkolban / node-mpu6050-wiringpi

A WiringPi based version of an MPU-6050 reader for Node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mpu6050-wiringpi

Access to the MPU-6050 accelerometer through WiringPi on the Raspberry Pi.

install

$ npm install mpu6050-wiringpi

Usage

The package provides a single method called readMag that returns an object containing the accelX, accelY and accelZ portions of the vector.

var MPU6050 = require("mpu6050-wiringpi");
var data = MPU6050.read();
console.log("Got acceleration data!");
console.dir(data);
console.log("accelX=" + data.accelX + ", accelY=" + data.accelY + ", accelZ=" + data.accelZ);

About

A WiringPi based version of an MPU-6050 reader for Node.js


Languages

Language:JavaScript 100.0%