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
zachleat
September 14, 2013
Technology
0
750
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
130
Credibility
zachleat
0
68
A Brief History of that Time You Used Web Fonts
zachleat
7
1.4k
The Performance and Usability of Font Loading (Velocity NYC 2015)
zachleat
3
570
The Performance and Usability of Font Loading (Velocity Santa Clara 2015)
zachleat
27
4.4k
Performance and Responsive Web Design
zachleat
7
1.7k
Remodeling @font-face
zachleat
17
3.3k
How and Why I Built fontfamily.io
zachleat
2
1.4k
Bulletproof Font Icons
zachleat
19
2.8k
Other Decks in Technology
See All in Technology
バクラクの認証基盤の成長と現在地 / bakuraku-authn-platform
convto
1
620
新卒エンジニアがCICDをモダナイズしてみた話
akashi_sn
2
250
ソフトウェア開発現代史: "LeanとDevOpsの科学"の「科学」とは何か? - DORA Report 10年の変遷を追って - #DevOpsDaysTokyo
takabow
0
390
YOLOv10~v12
tenten0727
4
960
ガバクラのAWS長期継続割引 ~次の4/1に慌てないために~
hamijay_cloud
1
280
AWSで作るセキュアな認証基盤with OAuth mTLS / Secure Authentication Infrastructure with OAuth mTLS on AWS
kaminashi
0
180
より良い開発者体験を実現するために~開発初心者が感じた生成AIの可能性~
masakiokuda
0
200
Would you THINK such a demonstration interesting ?
shumpei3
1
230
勝手に!深堀り!Cloud Run worker pools / Deep dive Cloud Run worker pools
iselegant
2
440
Notion x ポストモーテムで広げる組織の学び / Notion x Postmortem
isaoshimizu
1
120
4/16/25 - SFJug - Java meets AI: Build LLM-Powered Apps with LangChain4j
edeandrea
PRO
2
120
エンジニアリングで組織のアウトカムを最速で最大化する!
ham0215
1
120
Featured
See All Featured
Building Applications with DynamoDB
mza
94
6.3k
Scaling GitHub
holman
459
140k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
How STYLIGHT went responsive
nonsquared
99
5.5k
Fontdeck: Realign not Redesign
paulrobertlloyd
83
5.5k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
Optimizing for Happiness
mojombo
377
70k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
19
1.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
Adopting Sorbet at Scale
ufuk
76
9.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
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