Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Attack of the drones!

Attack of the drones!

Flying helicopters with Arduino and node.js

Gilles Ruppert

May 15, 2013
Tweet

More Decks by Gilles Ruppert

Other Decks in Technology

Transcript

  1. Specs • WiFi (b/g/n) Router • 1GHz 32Bit ARM Cortex

    A8 processor • 125 MB DDR2 RAM • Linux 2.6.32 (Busybox) • 720p front facing camera (30fps) • 240p vertical camera (60 fps) • USB 2.0 connector Wednesday, 15 May 13
  2. Specs • 3 axis gyroscope (2000º/second precision) • 3 axis

    accelerometer (± 50mg precision) • 3 axis magentometer (6º precision) • Pressure sensor (±10Pa precision) • Ultrasound sensors • Fully repairable - all components can be ordered • 300 Euro Wednesday, 15 May 13
  3. • Connect to it via WiFi • telnet into it

    • open protocol (Parrot publishes SDK) • commands via UDP packets • https://github.com/felixge/node-ar-drone In a nutshell Wednesday, 15 May 13
  4. Some examples // repl.js var arDrone = require('ar-drone'); var client

    = arDrone.createClient(); client.createRepl(); client.takeoff(); // cli // drone takes off (see script) $ node repl.js drone> clockwise(0.5) // land the drone drone> land() Wednesday, 15 May 13
  5. • open-source electronics prototyping platform • easy-to use • usually

    programmed with Arduino programming language (based on Wiring) • Made in Italy Overview Wednesday, 15 May 13
  6. • none to very little knowledge of electronics necessary •

    some great beginners kits Wednesday, 15 May 13
  7. Code Example // JOHNNY FIVE var five = require('johnny-five'); var

    board = new five.Board(); // once the board is ready board.on('ready', function () { // create a new LED object on pin 13 and strobe it (new five.Led(13)).strobe(); }); Wednesday, 15 May 13
  8. Compared to // the setup routine runs once when you

    press reset: void setup() { // initialize the digital pin as an output. pinMode(13, OUTPUT); } // the loop routine runs over and over again forever: void loop() { // turn the LED on (HIGH is the voltage level) digitalWrite(13, HIGH); // wait for a second delay(1000); // turn the LED off by making the voltage LOW digitalWrite(13, LOW); // wait for a second delay(1000); } Wednesday, 15 May 13
  9. up down counter clockwise clockwise front back left right takeoff/land

    animation 1 animation 2 Wednesday, 15 May 13
  10. • physical components are not ‘perfect’ • properties change depending

    on circumstances • the cheaper the component, the less ‘perfect’ and the more ‘tolerant’ it is • debugging Gotchas Wednesday, 15 May 13
  11. Other ideas • create an autonomous drone • create a

    whole control centre • mash up different modules found on nodecopter.com • build an autonomous greenhouse, etc • your own fantasy is the limit! Wednesday, 15 May 13
  12. Conclusion • barrier to entry lower than ever: • lots

    of information • prices are affordable • use the tools you know Wednesday, 15 May 13
  13. “Any application that can be written in JavaScript, will eventually

    be written in JavaScript.” Atwood’s law Wednesday, 15 May 13
  14. Join us • AUG Roma (http://bit.ly/aug-roma) • start of RomaJS

    meetup • organise a nodecopter event in Rome Wednesday, 15 May 13
  15. Thank you gillesruppert @gillesruppert http://github.com/gillesruppert/nodecopter-remote thanks to Jan Marsch (https://plus.google.com/107012710192519215701/posts)

    & Nico Kaiser (http://www.flickr.com/photos/73084860@N00/) for permission to use pictures Wednesday, 15 May 13