/dial-a-drone

Need to control a drone? Just dial-a-drone

Primary LanguageJavaScript

Dial-a-Drone

Control the Parrot Minidrone Rolling Spider with SMS & a phone call using Nexmo

Dial-a-drone

Install

$ git clone git@github.com:adambutler/dial-a-drone.git
$ cd dial-a-drone
$ npm install
$ cp .env.example .env

Prerequisites

  1. Setup a Nexmo account

  2. Setup the Nexmo CLI

Usage

  1. Host this application or setup a local tunnel to your development machine.

Note: We recommend you use ngrok to point to your local system.

  1. Search for and buy a virtual number in your country with SMS support.

    $ nexmo numbers:search GB --sms
    $ nexmo number:buy <NUMBER>
  2. Create a Nexmo app pointing the webhooks to your application & link the number

    $ nexmo app:create dial-a-drone <HOSTNAME>/answer <HOSTNAME>/event --type=voice --keyfile=private.key
    
    $ nexmo link:app <YOUR_NUMBER> <YOUR_APP_ID>

    dial-a-drone-number-2

  3. In your Nexmo account Settings > API settings change HTTP Method to POST-JSON.

    account-settings

  4. Add the HOSTNAME to the .env file

  5. Run the app

    $ npm start
  6. Dial your Nexmo number.

Controlling the Drone

Dial your number and control the drone with the following commands -

Action Key SMS Message
Take off 1 takeoff
Land 9 land
Forward 2 forward
Backwards 8 back
Tilt left 4 left
Tilt right 6 right
Flip 5 flip

Contributing

Contributions are welcome, please follow GitHub Flow