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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
zachleat
September 14, 2013
Technology
1k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
nodecopter
A presentation for HowConf 2013.
zachleat
September 14, 2013
More Decks by zachleat
See All by zachleat
NEJS CONF 2017 Interstitial Slides
zachleat
0
160
Credibility
zachleat
0
110
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
680
The Performance and Usability of Font Loading (Velocity Santa Clara 2015)
zachleat
27
4.8k
Performance and Responsive Web Design
zachleat
7
2.2k
Remodeling @font-face
zachleat
17
3.6k
How and Why I Built fontfamily.io
zachleat
2
1.6k
Bulletproof Font Icons
zachleat
19
3.1k
Other Decks in Technology
See All in Technology
1.5時間を無駄にして学んだwsl2におけるaptとsnapの選択と仕組み
yosaka0123
0
460
Kiro5兄弟のいまどきのセキュリティ基礎知識
kentapapa
0
380
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
24k
本番に近いテストをもっと手軽に - Postmanで広がるAPIテストの世界 / Expanding the World of API Testing with Postman
yokawasa
1
130
Oracle AI Databaseデータベース・サービス: BaseDB/ExaDB-Dの可用性
oracle4engineer
PRO
1
960
AI駆動開発を組織で促すために
lycorptech_jp
PRO
7
8.7k
dbt と Snowflake と tag
kevinrobot34
2
290
『自分で判断できるか』を基準に、プロダクトのハンズオン研修でAI利用の線を引いてみた / Where We Drew the Line on AI in Hands-on Training
honyanya
1
440
1000⼈規模のClaude Enterprise運⽤を「Oktaのグループ」と「Slack」に集約する
sansantech
PRO
1
500
LLMアプリ、 雰囲気で運用してませんか? 〜LLMOpsの現在地〜
taka_aki
1
550
[ホンマでっか SRE] あなたはなぜ SRE に?
_awache
0
360
internal/testlog で遊ぼう
rokuosan
0
340
Featured
See All Featured
Google's AI Overviews - The New Search
badams
0
1.6k
sira's awesome portfolio website redesign presentation
elsirapls
0
350
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
The untapped power of vector embeddings
frankvandijk
2
1.8k
The Cult of Friendly URLs
andyhume
79
7k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
750
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.2k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
The Language of Interfaces
destraynor
162
27k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
390
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