accel-mma84
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -0,1 +1,4 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
/********************************************* | ||
@@ -6,5 +9,2 @@ This basic accelerometer example logs a stream | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
var tessel = require('tessel'); | ||
@@ -15,3 +15,3 @@ var accel = require('../').use(tessel.port['A']); // Replace '../' with 'accel-mma84' in your own code | ||
accel.on('ready', function () { | ||
// Stream accelerometer data | ||
// Stream accelerometer data | ||
accel.on('data', function (xyz) { | ||
@@ -25,2 +25,4 @@ console.log('x:', xyz[0].toFixed(2), | ||
setInterval(function(){}, 20000); | ||
accel.on('error', function(err){ | ||
console.log('Error:', err); | ||
}); |
@@ -0,1 +1,4 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
/********************************************* | ||
@@ -8,5 +11,2 @@ This more advanced accelerometer example logs | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
var tessel = require('tessel'); | ||
@@ -38,2 +38,4 @@ var accel = require('../').use(tessel.port['A']); // Replace '../' with 'accel-mma84' in your own code | ||
setInterval(function() {}, 20000); | ||
accel.on('error', function(err){ | ||
console.log('Error:', err); | ||
}); |
@@ -0,1 +1,4 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
/********************************************* | ||
@@ -8,5 +11,2 @@ Demonstrates axes by turning on a different | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
var tessel = require('tessel'); | ||
@@ -57,1 +57,5 @@ var accel = require('../').use(tessel.port['A']); // Replace '../' with 'accel-mma84' in your own code | ||
}); | ||
accel.on('error', function(err){ | ||
console.log('Error:', err); | ||
}); |
12
index.js
@@ -1,5 +0,1 @@ | ||
var util = require('util'); | ||
var EventEmitter = require('events').EventEmitter; | ||
var queue = require('sync-queue'); | ||
// Copyright 2014 Technical Machine, Inc. See the COPYRIGHT | ||
@@ -14,2 +10,6 @@ // file at the top-level directory of this distribution. | ||
var util = require('util'); | ||
var EventEmitter = require('events').EventEmitter; | ||
var queue = require('sync-queue'); | ||
// The SparkFun breakout board defaults to 1, set to 0 if SA0 jumper on the bottom of the board is set | ||
@@ -38,3 +38,3 @@ var I2C_ADDRESS = 0x1D; // 0x1D if SA0 is high, 0x1C if low | ||
// Interrupt pin for the data ready event | ||
self.dataInterrupt = self.hardware.digital[2]; | ||
self.dataInterrupt = self.hardware.digital[1]; | ||
// Address for i2C | ||
@@ -48,3 +48,3 @@ // TODO: Account for manual address changes? | ||
if (err) { | ||
// Fail the init | ||
err = new Error("Could not connect to MMA8452Q. No reponse on I2C lines. Error: "+err); | ||
return self._failProcedure(err); | ||
@@ -51,0 +51,0 @@ } |
{ | ||
"name": "accel-mma84", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Library to run the MMA8452Q accelerometer.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
31574
475
3
80