This is a Work in progress
We recommend adding
"type": "module"
to yourpackage.json
to allow top-level await
npm i tello-sdk3
import Tello from 'tello-sdk3';
const drone = new Tello();
await drone.connect();
await drone.takeOff();
await drone.sleep(1000);
await drone.land();
import Tello from 'tello-sdk3';
const drone = new Tello();
// Move until you reach 150cm
while (drone.sensor.height < 150) {
await drone.move.up(25);
}
await drone.land();
import Tello from 'tello-sdk3';
const drone = new Tello();
await drone.set.speed(50);
await drone.move.front(30);
await drone.move.back(30);
await drone.land();