0.0.3 • Published 3 years ago

@giwisoft/ryze-tello-sdk v0.0.3

Weekly downloads
2
License
Apache-2.0
Repository
-
Last release
3 years ago

Ryze Tello commands

NodeJS utility for the Ryze Tello Drone

Video stream is supported, but you need mplayer.

Usage

yarn install @giwisoft/ryze-tello-sdk

Connect to the Tello's Wifi.

yarn start
'use strict';
const tello = require('./lib/tello');

tello.start()
    .then(() => tello.takeoff())
    .then(() => tello.forward(50))
    .then(() => tello.rotateCCW(360))
    .then(() => {
        return new Promise(resolve =>
            tello.get('h').then(r => {
                console.log('height', r.value);
                resolve()
            }));
    })
    .then(() => tello.backward(50))
    .then(() => tello.land())
    .then(() => tello.stop());

or

const tello = require('./lib/tello');

'use strict';

(async() => {
  // Start the engine
  await tello.start();
  await tello.startStream();
  await tello.startTelemetry({});
  await tello.takeoff();
  // Read the battery status
  console.log('battery', (await tello.get('bat')).value, '%');
  // Go up
  await tello.up(50);
  // Perform a forward flip
  await tello.flip('f');
  // Go forward
  await tello.forward(50);
  await tello.right(20);
  // Read the height
  console.log('height', (await tello.get('h')).value, 'cm');
  // Go backward
  await tello.backward(100);
  await tello.rotateCW(360);
  // Finally land
  await tello.land();
  await tello.stopTelemetry();
  await tello.stopStream();
  // And then shut down the engine
})().then(() => tello.stop());

Tello flight vars

NameUnitDescription
hcmheight
barocmbarometer
tofcmto floor distance
templ°Cmin temperature
temph°Cmax temperature
pitch°attitude pitch
roll°attitude roll
yaw°attitude yaw
agx0.001gacceleration x
agy0.001gacceleration y
agz0.001gacceleration z
vgxcm/sspeed x
vgycm/sspeed y
vgzcm/sspeed z
bat%battery

RoadMap

  • Save video on the file system
  • Take pictures
  • RealTime remote control with web video stream
  • Raspberry setup
  • GamePad support on Raspberry