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

Android Things: Building for the IoT

Android Things: Building for the IoT

1cf799036b5d9439e9ed823c9b0c15cb?s=128

Joe Birch

June 22, 2017
Tweet

Transcript

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

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

  3. @buffer buffer.com

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

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

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

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

  8. Create for a wide range of use cases

  9. Interaction Design

  10. Inter-usability Familiarity across form factors

  11. Familiar experience Making things fun and familiar

  12. Getting phy-gital Sensors & Actuators Sensors Actuators

  13. Android Ecosystem

  14. Android Ecosystem

  15. Use existing Android tools and APIs New IoT specific APIs

    Stay up-to-date with Android updates
  16. Use existing Android tools and APIs

  17. New IoT specific APIs

  18. New IoT specific APIs

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

  20. So I can use any API?!

  21. Not quite…

  22. Stay up-to-date with Android updates

  23. Stay up-to-date with Android updates

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

    V3
  25. Prototyping Building ideas with plug & play components

  26. BrailleBox A braille news reader for the sight impaired

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

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

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

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

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

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

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

  34. Switches GPIO General Purpose Input Output

  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
  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)
  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)
  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)
  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)
  40. Switches Schematics A braille news reader for the sight impaired

  41. Switches Resistor Restricting the flow current

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

  43. Switches Diode Restricting the direction current

  44. Switches LED A Diode with added spark

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

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

    on device launch
  47. Switches IoT Launcher Starting your app at launch <application android:name=".BrailleBoxApplication"

    android:label="@string/app_name"> <uses-library android:name="com.google.android.things"/> <activity android:name=".ui.main.MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.IOT_LAUNCHER"/> <category android:name="android.intent.category.DEFAULT"/> </intent-filter> </activity> </application>
  48. https://github.com/hitherejoe/BrailleBox https://medium.com/@hitherejoe

  49. @hitherejoe hitherejoe joebirch.co Thank you!