spheron-accel
Get accelerometer data from Sphero
Last updated 7 years ago by parshap .
Public Domain · Repository · Original npm · Tarball · package.json
$ cnpm install spheron-accel 
SYNC missed versions from official npm registry.

spheron-accel

Stream accelerometer data from your Sphero using the spheron module.

Note that this module uses the Set Data Streaming command, which will overwrite any previous calls and any future calls will stop the accelerometer data stream;

Example

var sphero = require("spheron").sphero(),
	accel = require("spheron-accel");

sphero.on("open", function() {
	accel(sphero).on("data", function(data) {
		console.log("accelerometer data", data.x, data.y, data.z);
	});
});

sphero.open("/dev/cu.Sphero-BYR-RN-SPP");

API

accel(sphero, options)

Given a sphero object (created by the spheron module), start reading accelerometer data and return a stream that will emit the values.

Options:

  • rate: Number of data samples read per second (default 10)

Installation

npm install spheron-accel

Current Tags

  • 0.0.1                                ...           latest (7 years ago)

1 Versions

  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (1)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2017 © taobao.org |