npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

parrot-minidrone

v1.1.1

Published

Node package that exposes a simple API for flying Parrot MiniDrones such as Rolling Spider, Airborne Cargo, Night and Hydrofoil.

Downloads

5

Readme

Travis Status

Fly Parrot MiniDrones with Node

This package wraps the BlueTooth low energy library Noble to expose a simple API for flying Parrot MiniDrones. That includes the Rolling Spider, Airborne Cargo, Night and Hydrofoil models. Unlike other libraries that are designed to run stepped commands, this library is designed to allow continuous control through any input device.

View the documentation

Dependencies

  • Noble requires Xcode. Download and install the latest version from Apple's developer network
  • Node >= 6.0.0

Get Started in 60 Seconds

  1. Grab the module npm install parrot-minidrone
  2. Create index.js with the below code
  3. Run the script node index.js
const Drone = require('parrot-minidrone');
const drone = new Drone({
    autoconnect: true,
});

drone.on('connected', () => drone.takeOff());
drone.on('flightStatusChange', (status) => {
    if (status === 'hovering') {
        drone.land();
        process.exit();
    }
});

Examples

In the examples folder of this library are a few scripts using the API to fly drones with various input devices.

Dualshock PlayStation Controller

Follow these directions from the root of the project to fly with a PS3/4 controller

  1. Turn on the drone
  2. Plug in the controller via USB or connect to your computer via Bluetooth
  3. Run node examples/dualshock-ps3-controller/drone.js
  4. Wait to see the drone connected message in the console output

Control Layout

Button | Function --- | --- Right Analog Stick | Altitude, yaw Left Analog Stick | Roll, pitch Square | Flat-trim Triangle | Toggle takeoff & land Circle | Emergency landing X | Take a picture L1 | Left flip R1 | Right Flip L2 | Front Flip R2 | Back Flip

Keyboard

To fly with the keyboard follow the below instructions.

  1. Turn on the drone
  2. Run node examples/keyboard/drone.js
  3. Wait to see the drone connected message in the console output

Control Layout

Key | Function --- | --- Arrow Up | Pitch + Arrow Down | Pitch - Left Arrow | Roll left Left Arrow | Roll right w | Altitude + s | Altitude + a | Yaw left d | Yaw right t | Toggle takeoff & land f | Flattrim Escape | Emergency land

Tests

To run the test runner execute npm test.

Changelog

1.1.0

  • Added support for Mambo, Blaze and New Z minidrones
  • Added support for setting max tilt, altitude, vertical speed, rotation speed and defining a drone type to connect to

1.0.3

  • Event battery change event
  • Fix issue with an error being thrown during connection on some Bluetooth devices

1.0.2

  • Documentation
  • Unit tests
  • Flips interface

Travis Status