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

JavaScript all the Things!

JavaScript all the Things!

Arduino, Drones, Leap Motion. Combined with node.js they open the door to hardware hacking for a new generation. An overview of some of the experiments and lessons learned from a guy who a year ago could not tell the difference between a resistor and a diode.
Video at: http://www.youtube.com/watch?v=OvJWkJ26OEM

Gilles Ruppert

October 03, 2013
Tweet

More Decks by Gilles Ruppert

Other Decks in Technology

Transcript

  1. • Connect to it via WiFi • telnet into it

    a.k.a. flying Linux computer Monday, 7 October 13
  2. • Connect to it via WiFi • telnet into it

    • open protocol (Parrot publishes SDK) a.k.a. flying Linux computer Monday, 7 October 13
  3. • Connect to it via WiFi • telnet into it

    • open protocol (Parrot publishes SDK) • commands via UDP a.k.a. flying Linux computer Monday, 7 October 13
  4. • Connect to it via WiFi • telnet into it

    • open protocol (Parrot publishes SDK) • commands via UDP • high-level JS client by Felix a.k.a. flying Linux computer Monday, 7 October 13
  5. • Connect to it via WiFi • telnet into it

    • open protocol (Parrot publishes SDK) • commands via UDP • high-level JS client by Felix • fully repairable a.k.a. flying Linux computer Monday, 7 October 13
  6. 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() Monday, 7 October 13
  7. • open-source electronics prototyping platform • easy-to use • Arduino

    programming language Overview Monday, 7 October 13
  8. • open-source electronics prototyping platform • easy-to use • Arduino

    programming language • no pre-requisite knowledge of electronics necessary Overview Monday, 7 October 13
  9. • open-source electronics prototyping platform • easy-to use • Arduino

    programming language • no pre-requisite knowledge of electronics necessary • great beginner kits! Overview Monday, 7 October 13
  10. • open-source electronics prototyping platform • easy-to use • Arduino

    programming language • no pre-requisite knowledge of electronics necessary • great beginner kits! Overview Monday, 7 October 13
  11. 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(); }); Monday, 7 October 13
  12. Compared to // the setup routine runs once when you

    press reset: void setup() { // initialize the digital pin 13 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); } Monday, 7 October 13
  13. • USB device • 2 monochromatic IR cameras • 3

    infrared LEDs Monday, 7 October 13
  14. • USB device • 2 monochromatic IR cameras • 3

    infrared LEDs • +/- 300 fps Monday, 7 October 13
  15. • USB device • 2 monochromatic IR cameras • 3

    infrared LEDs • +/- 300 fps • “complex Math” a.k.a. MAGIC Monday, 7 October 13
  16. • USB device • 2 monochromatic IR cameras • 3

    infrared LEDs • +/- 300 fps • “complex Math” a.k.a. MAGIC • tracks fingers, hands, pens, etc Monday, 7 October 13
  17. • debugging can be hard • physical components are not

    ‘perfect’ Gotchas Monday, 7 October 13
  18. • debugging can be hard • physical components are not

    ‘perfect’ • properties change depending on circumstances Gotchas Monday, 7 October 13
  19. • debugging can be hard • physical components are not

    ‘perfect’ • properties change depending on circumstances • cheap components can make your life miserable! Gotchas Monday, 7 October 13
  20. Get started! • barrier to entry lower than ever •

    lots of information Monday, 7 October 13
  21. Get started! • barrier to entry lower than ever •

    lots of information • prices are affordable Monday, 7 October 13
  22. Get started! • barrier to entry lower than ever •

    lots of information • prices are affordable • use the tools you know Monday, 7 October 13
  23. Get started! • barrier to entry lower than ever •

    lots of information • prices are affordable • use the tools you know • learn new skills Monday, 7 October 13
  24. Get started! • barrier to entry lower than ever •

    lots of information • prices are affordable • use the tools you know • learn new skills • you might even be able to make a bit of money! Monday, 7 October 13
  25. “Any application that can be written in JavaScript, will eventually

    be written in JavaScript.” Atwood’s law Monday, 7 October 13