Socket
Socket
Sign inDemoInstall

aerogel

Package Overview
Dependencies
8
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    aerogel

CrazyFlie control software


Version published
Weekly downloads
5
increased by25%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

aerogel

A node.js control library for the Crazyflie nano-copter. This is a work in progress! Your contributions are more than welcome.

Installation

libusb is required for the radio driver. On OS X, install with homebrew:

brew install libusb

Then install Aerogel:

npm install aerogel

Aerogel uses new-style node streams so it requires node 0.10.x or later.

Basics

The copter object is what your control scripts should manipulate.

A simple script for taking off then landing again immediately looks like this:

var Aerogel = require('../index');

var driver = new Aerogel.CrazyDriver();
var copter = new Aerogel.Copter(driver);
process.on('SIGINT', copter.land.bind(copter));

driver.findCopters()
.then(function(copters)
{
	if (copters.length === 0)
	{
		console.error('No copters found! Is your copter turned on?');
		process.exit(1);
	}

	var uri = copters[0];
	console.log('Using copter at', uri);
	return uri;
})
.then(function(uri) { return copter.connect(uri); })
.then(function() { return copter.takeoff(); })
.then(function() { return copter.land(); })
.then(function() { return copter.shutdown(); })
.done();

Telemetry

The protocol driver emits telemetry information as events that the copter object listens for. The handlers for these events don't do anything yet, but the plan is that they'll eventually be used to implement higher-level flight control constructs & autonomous goal-seeking.

copter.handleStabilizerTelemetry() gets an object with three orientation fields:

  • roll
  • pitch
  • yaw

copter.handleMotorTelemetry() gets an object with the state of the four motors: m1, m2, m3, and m4.

API

TODO

Aerogel exposes a promises API at the moment. Eventually I plan to offer a standard callback API as well. If you do not pass a callback to a method, a promise is returned.

To-do

Everything.

Contributing

Allman bracing, tabs to indent, camel case. Write tests in Mocha. mocha-as-promised and chai-as-promised are available. Do cool things.

License

MIT.

Keywords

FAQs

Last updated on 18 Jun 2013

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc