0.0.3 • Published 4 years ago

@node-tello/drone v0.0.3

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

@node-tello/drone

@node-tello/drone is a module for controlling a RyzeRobotics/DJI Tello drone.

It consists of a high level interface wrapping 3 core modules which are used for communication with the drone.

  • @node-tello/commander - Sends commands to the Drone
  • @node-tello/cadet - Receives state updates from the Drone
  • @node-tello/ensign - Experimental Take photos and receive a usable video stream from the Tello cam

Monorepo

Dependencies

Usage

import { Drone, State } from '@node-tello/drone';

const drone = new Drone();

drone.on('state', (state: State) => {
  return console.log(state.toString())
});

await drone.initalise();

console.log('Get Battery Level');
const batteryLevel = await drone.getBattery();
console.log(batteryLevel);

console.log('takeoff');
await drone.takeoff();

console.log('land');
await drone.land();

drone.disconnect();

Javascript

const { Drone, State } = require( '@node-tello/drone');

const drone = new Drone();

drone.on('state', state => {
  return console.log(state.toString())
});

await drone.initalise();

console.log('Get Battery Level');
const batteryLevel = await drone.getBattery();
console.log(batteryLevel);

console.log('takeoff');
await drone.takeoff();

console.log('land');
await drone.land();

drone.disconnect();

Examples