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
710
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
65
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
540
The Performance and Usability of Font Loading (Velocity Santa Clara 2015)
zachleat
27
4.4k
Performance and Responsive Web Design
zachleat
7
1.6k
Remodeling @font-face
zachleat
17
3.2k
How and Why I Built fontfamily.io
zachleat
2
1.3k
Bulletproof Font Icons
zachleat
19
2.7k
Other Decks in Technology
See All in Technology
AI×医用画像の現状と可能性_2024年版/AI×medical_imaging_in_japan_2024
tdys13
1
1.3k
embedパッケージを深掘りする / Deep Dive into embed Package in Go
task4233
1
200
生成AI × 旅行 LLMを活用した旅行プラン生成・チャットボット
kominet_ava
0
150
自社 200 記事を元に整理した読みやすいテックブログを書くための Tips 集
masakihirose
2
310
ゼロからわかる!!AWSの構成図を書いてみようワークショップ 問題&解答解説 #デッカイギ #羽田デッカイギおつ
_mossann_t
0
1.5k
KMP with Crashlytics
sansantech
PRO
0
220
Copilotの力を実感!3ヶ月間の生成AI研修の試行錯誤&成功事例をご紹介。果たして得たものとは・・?
ktc_shiori
0
310
EMConf JP の楽しみ方 / How to enjoy EMConf JP
pauli
2
140
三菱電機で社内コミュニティを立ち上げた話
kurebayashi
1
340
今年一年で頑張ること / What I will do my best this year
pauli
1
210
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
3.5k
iPadOS18でフローティングタブバーを解除してみた
sansantech
PRO
1
100
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.4k
Music & Morning Musume
bryan
46
6.3k
Facilitating Awesome Meetings
lara
51
6.2k
A better future with KSS
kneath
238
17k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
3
350
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Side Projects
sachag
452
42k
VelocityConf: Rendering Performance Case Studies
addyosmani
327
24k
Writing Fast Ruby
sferik
628
61k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
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