Upgrade to Pro — share decks privately, control downloads, hide ads and more …

nodecopter

zachleat
September 14, 2013

 nodecopter

A presentation for HowConf 2013.

zachleat

September 14, 2013
Tweet

More Decks by zachleat

Other Decks in Technology

Transcript

  1. Linux 2.6.32 (BusyBox) 802.11B,G,N WiFi access point Gyroscope (orientation) Accelerometer

    Magnetometer (compass, direction) Pressure Sensor (altitude) Ultrasound Sensor (altitude up to 6m)
  2. var  arDrone  =  require(  'ar-­‐drone'  ); var  client  =  arDrone.createClient();

    client.takeoff(); client.after(  4000,  function()  {   this.stop();   this.land(); }); Save this in takeoff-and-land.js
  3. //  argument:  speed  0-­‐1 client.up(  1  );  //  altitude client.down(

     1  ); client.left(  1  );  //  bank  (roll) client.right(  1  );  //  bank  (roll) client.front(  1  );  //  pitch client.back(  1  );  //  pitch client.clockwise(  1  );  //  yaw  (spin) client.counterClockwise(  1  );  //  yaw  (spin) client.stop();  //  movement=0 Also http://ministryoftype.co.uk/words/article/pitch_bank_and_yaw/
  4. client.animate('flipLeft',  1500); client.animate('flipRight',  1500); /* 'phiM30Deg',  'phi30Deg',  'thetaM30Deg',  'theta30Deg',  'theta20degYaw200deg',

    'theta20degYawM200deg',  'turnaround',  'turnaroundGodown',  'yawShake', 'yawDance',  'phiDance',  'thetaDance',  'vzDance',  'wave',  'phiThetaMixed', 'doublePhiThetaMixed',  'flipAhead',  'flipBehind' */ Also
  5. var  arDrone  =  require(  'ar-­‐drone'  ); var  fs  =  require(

     'fs'  ); var  client    =  arDrone.createClient(); var  png  =  client.getPngStream(); png.on(  'error',  function  (  error  )  {   console.error(  'error:  '  +  err  ); }); png.on(  'data',  function(  buffer  )  {   console.log(  buffer.length  );   fs.writeFile(  'camera.png',  buffer,  'binary',  function(  error  )  {     if(  error  )  {       console.log(  error  );     }  else  {       console.log(  'Success.'  );     }     process.exit(0);   }); }); Take a picture, save it to the file system
  6. var  cv  =  require('opencv'); cv.readImage("./hobbiton.jpg",  function(err,  im){   im.detectObject(cv.FACE_CASCADE,  {},

     function(err,   faces){     for  (var  i=0;i<faces.length;  i++){       var  x  =  faces[i];       im.ellipse(x.x  +  x.width/2,  x.y  +  x.height/2,   x.width/2,  x.height/2);     }     im.save('./hobbiton-­‐faces.jpg');   }); }); Find the faces in a picture
  7. Control drone with a Kinect https://github.com/maxogden/drone-kinect Control with Wii remote

    https://github.com/voodootikigod/wii-drone LeapMotion http://www.youtube.com/watch?v=sWjbdZU23_0&t=22