Code Monkey home page Code Monkey logo

drone-api's Introduction

pyMultiWii

A Python package to control Drones that run the MultiWii Protocol.

API Compatibility

  • Drona Aviation Pluto

Using the Library

First install the package from pip

pip install pyMultiWii

Import the Library in your Python Program

import pyMultiWii

Create an object to the class pyMultiWii

myDrone=pyMultiWii.pyMultiWii(IP, PORT)

The IP and the PORT parameters are specific to drones, but most common values are 192.168.4.1 and 23 respectively, for ESP8266 based Wifi Drones.

myDrone=pyMultiWii.pyMultiWii('192.168.4.1', 23)

You can enable some basic debugging by adding a third parameter above, set to True

myDrone=pyMultiWii.pyMultiWii('192.168.4.1', 23, True)

If you experience lagging and erratic behavior, set the third variable to False or ignore it completely in the above statement.

Connecting and Arming The Drone

Once a successful connection is made, you need to arm the drone. Most drones will arm with throttle set to 0%, to prevent the drone from flying immediately. Using the myDrone object, you can set throttle to 0% and arm the drone as follows.

myDrone.setThrottle(1000) //1000 by default is lowest range of the throttle
myDrone.arm()

Flying the Drone

The drone once armed, is ready to fly. Caution: Please fly responsibly and outdoors, away from people and pets.

Increase Thottle

The Throttle values on MultiWii systems range from the range [1000, 2000]. The 1000 value is the lower range. Get the drone to fly by setting a value here

myDrone.setThrottle(1050)// Just spinning the motors

or let it hover a little

myDrone.setThrottle(1200)// Increase Throttle

Change Pitch

The Pitch values on MultiWii systems range from the range [1200, 1800]. The 1200 value is the lower range. Get the drone to Pitch forward and back by setting a value here

myDrone.setPitch(1550)

Change Roll

The Roll values on MultiWii systems range from the range [1200, 1800]. The 1200 value is the lower range. Get the drone to Roll left and right back by setting a value here

myDrone.setRoll(1300)

Change Yaw

The Yaw values on MultiWii systems range from the range [1000, 2000]. The 1000 value is the lower range. Get the drone to Yaw by setting a value here

myDrone.setYaw(1200) 

drone-api's People

Contributors

rupin avatar suketushah5037 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

aniketixr

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.