Giter VIP home page Giter VIP logo

web-bluetooth-parrot-drone's Introduction

Web Bluetooth Parrot Mini Drone Controller

Controlling a Parrot Mini Drone from Chrome for Android, using Web Bluetooth.

Parrot mini drone

Demo Video

Demo video

(https://youtu.be/gXu3G3cg52k)

Setup

Currently requires Chrome or Opera (watch this space for Samsung Internet support ;-)).

Run the web app up on your dev machine with any simple web server that can serve static files, e.g.: python -m SimpleHTTPServer 8080

Go to chrome://inspect/#devices and enable port forwarding for port 8080. Now you should be able to visit localhost:8080 on your Android device, to see the dashboard.

NB. You can't just point to an IP address because Web Bluetooth requires HTTPS, if not serving from localhost.

If you wish to host a version somewhere, it will need to be over HTTPS. (Previously you needed the Web Bluetooth flag enabled in the browser or to register your site for an origin trial but) it is now enabled by default, since Chrome 56 and Opera 43.

Safety warning

There may be bugs! Please observe the usual caution with drone flying as well as making sure you have a backup method of disabling the drone in the event of a bug! (A technique I have used is to raise something like a strong piece of card up towards the drone from underneath. When it detects it has been touched, the drone should shut down automatically).

Then...

  • Ensure the drone is switched on and the lights are green.

  • Press the 'Connect' button.

App screenshot

  • Select your drone name to pair with.

Pair screen

  • Now you're in control! Try Take Off, Flip and Land.

Troubleshooting

I still need to fix taking off multiple times - for now you will need to refresh the page.

If it doesn't work, try switching the drone off and on again, wait for the green lights, and then try the above again. Please note the drone will need to have enough battery life remaining or it may silently ignore commands.

If you still have trouble, you can have the remote debugging tools open in Chrome to see the console logs and this may help you to see where it's going wrong, at least. If you spot any fixes / improvements that could be made, PRs are welcome!

Parrot Drone Docs

If you are interested to learn more about the API to communicate with the drone, you can find links to docs here.

Thanks

I am indebted to voodootikigod's rolling spider project for demonstrating how to communicate with the drone. This demo borrows a lot from it.

Thanks also to @beaufortfrancois for collaborating with me to get the demo working better!

web-bluetooth-parrot-drone's People

Contributors

poshaughnessy avatar nielsleenheer avatar

Watchers

James Cloos avatar

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.