Use this script to control an ARDrone 2.0 with a DUALSHOCK 4 Controller.
1.Install the Ar-Drone module from npm:
npm install ar-drone
2.Install the dualshock module from npm:
npm install dualshock-controller
3.Clone my repo onto your computer
git clone https://github.com/randomite/ArDrone-DualShock4.git
- Connect your computer to drone's wifi network
- Connect your controller to you computer
- You can use the usb cable
- Or you can use bluetooth 1. For [mac] (http://www.mactrast.com/2013/10/use-playstation-4-dualshock-4-controller-play-games-mac/) 2. For [pc] (http://www.gamepur.com/news/12584-how-pair-ps4s-dualshock-4-controller-pc-bluetooth.html) 3. For [linux (ubuntu)] (http://askubuntu.com/questions/427311/how-to-setup-dual-shock-4-controller-with-ubuntu-13-10)
- Inside the repo that you cloned above:
node fly.js
Button | Result |
---|---|
x | takeoff |
triangle | land |
r2 | increase altitude |
l2 | decrease altitude |
right joystick - right | move right horizontally |
right joystick - left | move left horizontally |
right joystick - up | move forward |
right joystick - down | move backward |
left joystick - left | move counter-clockwise |
left joystick - right | move clockwise |
- Video Stream from drone's built in camera
- Use DualShock touchpad for more controls
Feel free to fork and submit a pull request!