You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.
ma-al / node-sumo Public
forked from forgeByAcision/node-sumoA Node.js client for controlling Parrot Jumping Sumo drones.
Notifications You must be signed in to change notification settings
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Go to fileTo get started, install the npm module:
$ npm install git+https://github.com/forgeByAcision/node-sumo
This simple example postures the drone and moves it forwards for 1 second:
var sumo = require('node-sumo'); var drone = sumo.createClient(); drone.connect(function() drone.postureJumper(); drone.forward(50); setTimeout(function() drone.stop(); >, 1000); >);
Returns a new Sumo
Returns a stream of MJPEG frames through the data event.
Connects to the drone and executes the callback when the drone is ready to drive. Also fires the ready event when teh drone is ready.
Move the drone forward at the specified speed (between 0 and 127).
Move the drone backward at the specified speed (between 0 and 127).
Turn the drone right at the specified speed (between 0 and 127).
Turn the drone right at the specified speed (between 0 and 127).
Tell the drone to stop moving.
Perform a long jump. The drone needs to be in the jumper or kicker posture to use this API.
When in kicker posture the first call will retract the drone's jump mechanism and the second will release it. You need to wait for the drone's jump mechanism to be fully retracted before releasing it. You can move the drone after the jump mechanism has been pulled in (for example, reversing up to a wall or object to kick) and before you release it.
Perform a high jump. The drone needs to be in the jumper posture to use this API.
Stop the pre-programmed animation.