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
560
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.2k
How and Why I Built fontfamily.io
zachleat
2
1.3k
Bulletproof Font Icons
zachleat
19
2.8k
Other Decks in Technology
See All in Technology
やさしいMCP入門
minorun365
PRO
58
31k
Multitenant 23ai の全貌 - 機能・設計・実装・運用からマイクロサービスまで
oracle4engineer
PRO
2
130
React Server Componentは 何を解決し何を解決しないのか / What do React Server Components solve, and what do they not solve?
kaminashi
6
1.3k
大規模アジャイル開発のリアル!コミュニケーション×進捗管理×高品質
findy_eventslides
0
620
AIエージェント完全に理解した
segavvy
4
300
DevinはクラウドエンジニアAIになれるのか!? 実践的なガードレール設計/devin-can-become-a-cloud-engineer-ai-practical-guardrail-design
tomoki10
3
1.4k
ゆるくVPC Latticeについてまとめてみたら、意外と奥深い件
masakiokuda
2
120
ウェブアクセシビリティとは
lycorptech_jp
PRO
0
330
どっちの API SHOW?SharePoint 開発における SharePoint REST API Microsoft Graph API の違い / Which API show? Differences between Microsoft Graph API and SharePoint REST API
karamem0
0
120
スケールアップ企業のQA組織のバリューを最大限に引き出すための取り組み
tarappo
4
990
一人QA時代が終わり、 QAチームが立ち上がった話
ma_cho29
0
300
10分でわかるfreeeのQA
freee
1
11k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
522
39k
Making the Leap to Tech Lead
cromwellryan
133
9.2k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.3k
Producing Creativity
orderedlist
PRO
344
40k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
480
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
102
18k
4 Signs Your Business is Dying
shpigford
183
22k
Practical Orchestrator
shlominoach
186
10k
How GitHub (no longer) Works
holman
314
140k
Navigating Team Friction
lara
184
15k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.5k
Adopting Sorbet at Scale
ufuk
75
9.3k
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