Node package that exposes a simple API for flying Parrot MiniDrones such as Rolling Spider, Airborne Cargo, Night and Hydrofoil.
npm install parrot-minidrone1. Grab the module npm install parrot-minidrone
1. Create index.js with the below code
1. Run the script node index.js
``
const Drone = require('parrot-minidrone');
const drone = new Drone({
autoconnect: true,
});
drone.on('connected', () => drone.takeOff());
drone.on('flightStatusChange', (status) => {
if (status === 'hovering') {
drone.land();
process.exit();
}
});
`
1. Turn on the drone
1. Plug in the controller via USB or connect to your computer via Bluetooth
1. Run node examples/dualshock-ps3-controller/drone.js
1. Wait to see the drone connected message in the console output
#### Control Layout
Button | Function
--- | ---
Right Analog Stick | Altitude, yaw
Left Analog Stick | Roll, pitch
Square | Flat-trim
Triangle | Toggle takeoff & land
Circle | Emergency landing
X | Take a picture
L1 | Left flip
R1 | Right Flip
L2 | Front Flip
R2 | Back Flip
1. Turn on the drone
1. Run node examples/keyboard/drone.js
1. Wait to see the drone connected message in the console output
#### Control Layout
Key | Function
--- | ---
Arrow Up | Pitch +
Arrow Down | Pitch -
Left Arrow | Roll left
Left Arrow | Roll right
w | Altitude +
s | Altitude +
a | Yaw left
d | Yaw right
t | Toggle takeoff & land
f | Flattrim
Escape | Emergency land