Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
nodecopter
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
zachleat
September 14, 2013
Technology
0
880
nodecopter
A presentation for HowConf 2013.
zachleat
September 14, 2013
Tweet
Share
More Decks by zachleat
See All by zachleat
NEJS CONF 2017 Interstitial Slides
zachleat
0
150
Credibility
zachleat
0
89
A Brief History of that Time You Used Web Fonts
zachleat
7
1.5k
The Performance and Usability of Font Loading (Velocity NYC 2015)
zachleat
3
620
The Performance and Usability of Font Loading (Velocity Santa Clara 2015)
zachleat
27
4.8k
Performance and Responsive Web Design
zachleat
7
2k
Remodeling @font-face
zachleat
17
3.5k
How and Why I Built fontfamily.io
zachleat
2
1.5k
Bulletproof Font Icons
zachleat
19
2.9k
Other Decks in Technology
See All in Technology
AI推進者の視点で見る、Bill OneのAI活用の今
sansantech
PRO
2
290
システムのアラート調査をサポートするAI Agentの紹介/Introduction to an AI Agent for System Alert Investigation
taddy_919
2
1.1k
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
320
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
66k
KubeCon + CloudNativeCon NA ‘25 Recap, Extensibility: Gateway API / NRI
ladicle
0
160
AI時代、1年目エンジニアの悩み
jin4
1
130
いよいよ仕事を奪われそうな波が来たぜ
kazzpapa3
3
310
ゼロから始めたFindy初のモバイルアプリ開発
grandbig
2
550
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
AI開発の落とし穴 〜馬には乗ってみよAIには添うてみよ〜
sansantech
PRO
10
5.6k
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
3.8k
Introduction to Bill One Development Engineer
sansan33
PRO
0
350
Featured
See All Featured
Technical Leadership for Architectural Decision Making
baasie
1
230
Product Roadmaps are Hard
iamctodd
PRO
55
12k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Producing Creativity
orderedlist
PRO
348
40k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
75
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
210
30 Presentation Tips
portentint
PRO
1
200
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
570
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
290
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
210
The Spectacular Lies of Maps
axbom
PRO
1
490
Transcript
nodecopter Yes, this is about JavaScript.
@zachleat http://zachleat.com Filament Group
First, an apology.
Viewing this talk will probably cost you about $370.
None
None
None
None
Cameras: Front: 720p (1280x720) 30fps, 92° view, H.264 Bottom: QVGA
(320x240) 60fps for ground speed
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)
Emergency Mode Flip upside down or (in extreme cases) stick
something in the propeller.
None
None
Meh.
“It’s all talk until the code runs.” —Ward Cunningham
Prerequisites Node.js nodejs.org NPM npmjs.org
$ npm install ar-drone
Connect to the drone
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
$ node takeoff-and-land.js
// 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/
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
var pngStream = client.getPngStream(); pngStream.on('data', console.log); var videoStream = client.getVideoStream();
videoStream.on('data', console.log); Camera
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
Full API https://github.com/felixge/node-ar-drone
Bonus Round http://opencv.org/ https://github.com/peterbraden/node- opencv
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
Community Modules http://nodecopter.com/hack#modules
http://eschnou.github.io/ardrone-webflight/
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
A ton more ideas and demos: http://nodecopter.com/impressions