Socket
Socket
Sign inDemoInstall

accel-mma84

Package Overview
Dependencies
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

accel-mma84 - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

12

examples/accelerometer.js

@@ -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);
});

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc