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

tello-drone-controller

v1.0.1

Published

Tello drone controller API using Node.js and Express, with the tello-drone library.

Downloads

10

Readme

Tello Drone Controller API

  • This project provides a API interface to control a Tello drone using Express.js.
  • It allows users to send commands to the Tello drone through HTTP GET requests, making it easier to integrate drone control into web applications or services.

Install Globally

npx tello-drone-controller

or

npm install -g tello-drone-controller

This will install the package globally and you can run the server from any directory.

Usage

tello-drone-controller # starts the server on port 9000

Development

Prerequisites

Before you begin, ensure you have met the following requirements:

  • Node.js (version 12 or newer recommended)
  • A Tello drone connected to your computer's Wi-Fi network

Installation

To install the Tello Drone Controller API, follow these steps:

  1. Clone the repository to your local machine:

    git clone [email protected]:cagataycali/tello-drone-controller.git
  2. Navigate to the project directory:

    cd tello-drone-controller
  3. Install the required npm packages:

    npm install

Usage

To start the server, run the following command in your project directory:

npm start

The server will listen on port 9000. You can change the port by modifying the port variable in the server script.

API Endpoints

The API currently supports the following endpoints:

  • GET /:command - Send a command to the Tello drone.

    • command: The command to send to the drone (e.g., takeoff, land, up, down, etc.).
    • Query Parameters:
      • value: (Optional) The value for commands that require it (e.g., distance, angle).
      • Additional command-specific parameters as needed.

Example Request

To make the drone take off:

GET http://localhost:9000/takeoff

To move the drone up by 30 cm:

GET http://localhost:9000/up?value=30

| Command | Description or Example Usage | |---------------|-------------------------------------------------------------------| | command | Initializes the command mode. GET http://localhost:9000/command | | takeoff | Commands the drone to take off. GET http://localhost:9000/takeoff| | land | Commands the drone to land. GET http://localhost:9000/land | | streamon | Turns on video streaming. GET http://localhost:9000/streamon | | streamoff | Turns off video streaming. GET http://localhost:9000/streamoff | | emergency | Stops all motors immediately. GET http://localhost:9000/emergency| | up | Moves the drone up. Example: GET http://localhost:9000/up?value=30| | down | Moves the drone down. Example: GET http://localhost:9000/down?value=30| | left | Moves the drone left. Example: GET http://localhost:9000/left?value=30| | right | Moves the drone right. Example: GET http://localhost:9000/right?value=30| | forward | Moves the drone forward. Example: GET http://localhost:9000/forward?value=30| | back | Moves the drone back. Example: GET http://localhost:9000/back?value=30| | cw | Rotates the drone clockwise. Example: GET http://localhost:9000/cw?value=90| | ccw | Rotates the drone counterclockwise. Example: GET http://localhost:9000/ccw?value=90| | flip | Flips the drone. Example: GET http://localhost:9000/flip?value=l (l for left)| | go | Sends the drone to coordinates. Example: GET http://localhost:9000/go?x=20&y=20&z=20&speed=10| | curve | Commands the drone to fly in a curve. Example: GET http://localhost:9000/curve?x1=20&y1=20&z1=20&x2=30&y2=30&z2=30&speed=10| | speed | Sets the speed of the drone. Example: GET http://localhost:9000/speed?value=10| | rc | Remote control the drone with more granularity. Example: GET http://localhost:9000/rc?a=0&b=0&c=0&d=0| | wifi | Sets the Wi-Fi SSID and password. Example: GET http://localhost:9000/wifi?ssid=yourSSID&pass=yourPass| | speed? | Queries the current speed. GET http://localhost:9000/speed? | | battery? | Queries the current battery percentage. GET http://localhost:9000/battery?| | time? | Queries the current flight time. GET http://localhost:9000/time?| | wifi? | Queries the current Wi-Fi SNR. GET http://localhost:9000/wifi? | | sdk? | Queries the SDK version. GET http://localhost:9000/sdk? | | sn? | Queries the serial number. GET http://localhost:9000/sn? |

Note: For commands that require parameters (like up, down, left, right, go, curve, etc.), replace the value=30, x=20, y=20, z=20, speed=10, a=0, b=0, c=0, d=0, ssid=yourSSID, and pass=yourPass with actual values you intend to use. The example parameters provided here are for illustration purposes only.

Contributing

Contributions to the Tello Drone Controller API are welcome. To contribute, please fork the repository and create a new branch for your feature or fix.

License

This project is licensed under the MIT License - see the LICENSE file for details.