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

Android Things: Building for the IoT

Android Things: Building for the IoT

Joe Birch

June 22, 2017
Tweet

More Decks by Joe Birch

Other Decks in Technology

Transcript

  1. androidthings
    Building for the IoT
    speakerdeck.com/hitherejoe/
    android-things-building-for-the-iot

    View Slide

  2. @hitherejoe hitherejoe joebirch.co
    Joe Birch - Android Engineer @ Buffer

    View Slide

  3. @buffer buffer.com

    View Slide

  4. The Internet of What?
    What exactly is the Internet of Things

    View Slide

  5. The Internet of What?
    What exactly is the Internet of Things

    View Slide

  6. The Internet of What?
    What exactly is the Internet of Things
    HUB

    View Slide

  7. UI not always present
    But there will always be UX

    View Slide

  8. Create for a wide range of use cases

    View Slide

  9. Interaction Design

    View Slide

  10. Inter-usability
    Familiarity across form factors

    View Slide

  11. Familiar experience
    Making things fun and familiar

    View Slide

  12. Getting phy-gital
    Sensors & Actuators
    Sensors Actuators

    View Slide

  13. Android Ecosystem

    View Slide

  14. Android Ecosystem

    View Slide

  15. Use existing Android tools and APIs
    New IoT specific APIs
    Stay up-to-date with Android updates

    View Slide

  16. Use existing Android tools and APIs

    View Slide

  17. New IoT specific APIs

    View Slide

  18. New IoT specific APIs

    View Slide

  19. Peripheral I/O API User Driver API
    New IoT specific APIs

    View Slide

  20. So I can use any API?!

    View Slide

  21. Not quite…

    View Slide

  22. Stay up-to-date with Android updates

    View Slide

  23. Stay up-to-date with Android updates

    View Slide

  24. Hardware updates
    Updating physical devices isn’t so easy
    V1
    V2
    V3

    View Slide

  25. Prototyping
    Building ideas with plug & play components

    View Slide

  26. BrailleBox
    A braille news reader for the sight impaired

    View Slide

  27. Switches
    BrailleBox
    A braille news reader for the sight impaired

    View Slide

  28. Switches
    BrailleBox
    A braille news reader for the sight impaired

    View Slide

  29. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  30. Switches
    Breadboard
    A braille news reader for the sight impaired

    View Slide

  31. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  32. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  33. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  34. Switches
    GPIO
    General Purpose Input Output

    View Slide

  35. Switches
    GPIO
    General Purpose Input Output
    Output for Pin 1
    Output for Pin 2
    Output for Pin 3
    Output for Pin 5
    Output for Pin 4
    Output for Pin 6

    View Slide

  36. Using GPIO pins
    // Open the GPIO pin for usage
    val gpioPin = peripheralManagerService.openGpio(pin)
    // Direction Input or Output
    gpioPin.setDirection(DIRECTION_OUT_INITIALLY_LOW)
    // When the Pin is classified as Active
    gpioPin.setActiveType(ACTIVE_HIGH)
    gpioPin.setEdgeType(Gpio.EDGE_BOTH)
    gpioPin.registerGpioCallback(someCallback)
    gpioPin.setValue(true)

    View Slide

  37. Using GPIO pins
    // Open the GPIO pin for usage
    val gpioPin = peripheralManagerService.openGpio(pin)
    // Direction Input or Output
    gpioPin.setDirection(DIRECTION_OUT_INITIALLY_LOW)
    // When the Pin is classified as Active
    gpioPin.setActiveType(ACTIVE_HIGH)
    gpioPin.setEdgeType(Gpio.EDGE_BOTH)
    gpioPin.registerGpioCallback(someCallback)
    gpioPin.setValue(true)

    View Slide

  38. Using GPIO pins
    // Open the GPIO pin for usage
    val gpioPin = peripheralManagerService.openGpio(pin)
    // Direction Input or Output
    gpioPin.setDirection(DIRECTION_OUT_INITIALLY_LOW)
    // When the Pin is classified as Active
    gpioPin.setActiveType(ACTIVE_HIGH)
    gpioPin.setEdgeType(Gpio.EDGE_BOTH)
    gpioPin.registerGpioCallback(someCallback)
    gpioPin.setValue(true)

    View Slide

  39. Using GPIO pins
    // Open the GPIO pin for usage
    val gpioPin = peripheralManagerService.openGpio(pin)
    // Direction Input or Output
    gpioPin.setDirection(DIRECTION_OUT_INITIALLY_LOW)
    // When the Pin is classified as Active
    gpioPin.setActiveType(ACTIVE_HIGH)
    gpioPin.registerGpioCallback(someCallback)
    gpioPin.registerGpioCallback(someCallback)
    gpioPin.setValue(true)

    View Slide

  40. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  41. Switches
    Resistor
    Restricting the flow current

    View Slide

  42. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  43. Switches
    Diode
    Restricting the direction current

    View Slide

  44. Switches
    LED
    A Diode with added spark

    View Slide

  45. Switches
    Schematics
    A braille news reader for the sight impaired

    View Slide

  46. Switches
    How does the app launch?
    Launching a chosen activity on device launch

    View Slide

  47. Switches
    IoT Launcher
    Starting your app at launch
    android:name=".BrailleBoxApplication"
    android:label="@string/app_name">













    View Slide

  48. https://github.com/hitherejoe/BrailleBox
    https://medium.com/@hitherejoe

    View Slide

  49. @hitherejoe hitherejoe joebirch.co
    Thank you!

    View Slide