$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
nodecopter
Search
zachleat
September 14, 2013
Technology
0
860
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
86
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
610
The Performance and Usability of Font Loading (Velocity Santa Clara 2015)
zachleat
27
4.6k
Performance and Responsive Web Design
zachleat
7
2k
Remodeling @font-face
zachleat
17
3.4k
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
評価駆動開発で不確実性を制御する - MLflow 3が支えるエージェント開発
databricksjapan
1
120
ガイドラインを軸にしたウェブアクセシビリティ改善
lycorptech_jp
PRO
1
100
チーリンについて
hirotomotaguchi
6
1.9k
Playwrightのソースコードに見る、自動テストを自動で書く技術
yusukeiwaki
13
5.3k
AI 駆動開発勉強会 フロントエンド支部 #1 w/あずもば
1ftseabass
PRO
0
340
LLM-Readyなデータ基盤を高速に構築するためのアジャイルデータモデリングの実例
kashira
0
240
Snowflakeでデータ基盤を もう一度作り直すなら / rebuilding-data-platform-with-snowflake
pei0804
4
1.4k
AWS Trainium3 をちょっと身近に感じたい
bigmuramura
1
140
Edge AI Performance on Zephyr Pico vs. Pico 2
iotengineer22
0
140
Playwright x GitHub Actionsで実現する「レビューしやすい」E2Eテストレポート
kinosuke01
0
570
Microsoft Agent 365 を 30 分でなんとなく理解する
skmkzyk
1
1.1k
[CMU-DB-2025FALL] Apache Fluss - A Streaming Storage for Real-Time Lakehouse
jark
0
110
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Designing Experiences People Love
moore
143
24k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Automating Front-end Workflow
addyosmani
1371
200k
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Building Applications with DynamoDB
mza
96
6.8k
Navigating Team Friction
lara
191
16k
Speed Design
sergeychernyshev
33
1.4k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.3k
The Language of Interfaces
destraynor
162
25k
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