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

Learning how to Tinker

Learning how to Tinker

Hardware hacking for web developers.

Presented at Hybrid Conf 2014

Andrew Nesbitt

August 22, 2014
Tweet

More Decks by Andrew Nesbitt

Other Decks in Technology

Transcript

  1. Learning how to tinker
    with
    Andrew Nesbitt

    View full-size slide

  2. Hardware hacking
    for
    Web people

    View full-size slide

  3. BEng Robotics & Automated Systems
    University of Plymouth

    View full-size slide

  4. Advanced Mathematics
    Mechanical Engineering
    Digital Electronics Analogue Electronics
    Computer Science
    Control Theory
    Neural networking Microprocessor Design
    Playing with Robots
    Learning Robotics

    View full-size slide

  5. Advanced Mathematics
    Observing Robots behind glass
    Learning Robotics
    Advanced Mathematics
    Advanced Mathematics
    Advanced Mathematics
    Advanced Mathematics
    Advanced Mathematics
    Advanced Mathematics
    Advanced Mathematics

    View full-size slide

  6. Back then robotics was:
    expensive,
    complicated
    and not fun

    View full-size slide

  7. APIs
    Open Source Hardware
    Smart phones
    High level Programming Languages
    GitHub
    Internet everywhere 3D Printing
    2014

    View full-size slide

  8. Gartner's 2014 Hype Cycle Report
    http://www.gartner.com/newsroom/id/2819918

    View full-size slide

  9. Internet of things
    Gartner's 2014 Hype Cycle Report
    http://www.gartner.com/newsroom/id/2819918

    View full-size slide

  10. Internet of things
    Gartner's 2014 Hype Cycle Report
    Software-Defined
    Anything
    http://www.gartner.com/newsroom/id/2819918

    View full-size slide

  11. Networked Motion and
    Temperature Sensors

    View full-size slide

  12. Internet of Things
    =
    Open Hardware APIs
    +
    Web Technologies

    View full-size slide

  13. Arduino IDE
    C++
    Compile, transfer, run

    View full-size slide

  14. Cat Laser Toy

    View full-size slide

  15. !
    var five = require("johnny-five"),

    board = new five.Board();


    function randomFromInterval(from,to){

    return Math.floor(Math.random()*(to-from+1)+from); 

    }


    board.on("ready", function() {

    var servoX = new five.Servo(10);

    var servoY = new five.Servo(9);

    var laser = new five.Led(8);


    laser.on()


    setInterval(function(){

    x = randomFromInterval(80, 120)

    y = randomFromInterval(95, 145)

    servoX.move(x)

    servoY.move(y)

    }, 400)

    })

    View full-size slide

  16. It's a UNIX system! I know this!

    View full-size slide

  17. Cat Laser Toy

    View full-size slide

  18. Cat Laser Toy
    Rabbit
    v
    |

    View full-size slide

  19. Demo Driven Development

    View full-size slide

  20. Sparkfun
    Inventors Kit
    hobbytronics.co.uk/sparkfun-inventors-kit-v3

    View full-size slide

  21. node-ardx.org

    View full-size slide

  22. gosphero.com

    View full-size slide

  23. Fear of failure

    View full-size slide

  24. It's a UNIX system! I know this!

    View full-size slide

  25. Prototyping tools

    View full-size slide

  26. Robot Rabbit Feeder

    View full-size slide

  27. !
    var Ev3 = require ("ev3-nodejs-bt");

    var Ev3_base = Ev3.base;


    var XboxController = require('xbox-controller');

    var xbox = new XboxController;


    var robot = new Ev3_base("/dev/tty.EV3-SerialPort");


    var maxAngle = 32768;

    var maxSpeed = 100;


    var speeds = { a: 0, b: 0, c: 0, d: 0 };

    View full-size slide

  28. robot.connect(function(){

    robot.start_program(function(ev3){

    var setSpeed = function(){

    var output = ev3.getOutputSequence(speeds.a,speeds.b,speeds.c,speeds.d);

    ev3.sp.write(output); }


    setInterval(setSpeed, 100)


    xbox.on('left:move', function(position){

    var x = -(position.x / maxAngle)*-maxSpeed

    var y = (position.y / maxAngle)*-maxSpeed

    var left = y-x

    var right = y+x


    speeds.b = left

    speeds.a = right

    })


    xbox.on('a:press', function(){ speeds.d = 100 })

    xbox.on('a:release', function(){ speeds.d = 0 })

    });

    });

    View full-size slide

  29. thingiverse.com

    View full-size slide

  30. tinkercad.com

    View full-size slide

  31. shapeways.com

    View full-size slide

  32. cube([30, 30, 30]);

    View full-size slide

  33. union(){!
    cube([30, 30, 30]);!
    cube([60, 10, 10]);!
    }

    View full-size slide

  34. difference() {!
    union(){!
    cube([30, 30, 30]);!
    cube([60, 10, 10]);!
    }!
    translate([30, 30, 30])!
    sphere(20);!
    }

    View full-size slide

  35. require "rubyscad"!
    !
    class MyShape!
    include RubyScad!
    !
    def render()!
    difference do!
    union do!
    cube(size: [30, 30, 30])!
    cube(size: [60, 10, 10])!
    end!
    !
    translate(v: [30, 30, 30]) do!
    sphere(r: 20)!
    end!
    end!
    end!
    end!
    !
    MyShape.new.render

    View full-size slide

  36. It's a UNIX system! I know this!

    View full-size slide

  37. 42 #hybridconfcube
    Tweet:
    Any number between 1 and 100

    View full-size slide

  38. 3D GitHub Contribution Graph

    View full-size slide

  39. hackerspaces.org

    View full-size slide

  40. robotsconf.com
    December 6-7 2014, Florida

    View full-size slide

  41. makerland.org

    View full-size slide

  42. Bring everything great
    about internet into the
    real world

    View full-size slide

  43. !
    Stay on the edge of your
    comfort zone

    View full-size slide

  44. It's a UNIX system! I know this!

    View full-size slide

  45. !
    Play with prototypes

    View full-size slide

  46. Get involved with the
    community

    View full-size slide

  47. !
    Change the world!

    View full-size slide

  48. Code: https://github.com/andrew/hybrid-2014

    View full-size slide

  49. Twitter: @teabass

    View full-size slide

  50. No rabbits were harmed in the making of this presentation
    Thanks!

    View full-size slide