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

Your own Google Home with Android Things on Raspberry Pi

Arnav Gupta
October 05, 2017

Your own Google Home with Android Things on Raspberry Pi

Using Android Things (0.5.1 dev preview) and gRPC Android Assistant API to build your own Google Home clone

Arnav Gupta

October 05, 2017
Tweet

More Decks by Arnav Gupta

Other Decks in Technology

Transcript

  1. Build your own Google Home using Raspberry Pi and Android

    Things A powerful electronics platform running the familiar Android stack with full Java API support Arnav Gupta Co-Founder & Android Mentor @ Coding Blocks
  2. Requirement 1: The Board (any one) • Raspberry Pi 3

    • NXP Pico MX6 • NXP Pico MX7 (Recommend this) • Intel Edison • … or crack open an old Android phone you’re not using :P
  3. Requirement 2: Lights and Buttons • 1xLED + 1xButton +

    Breadboard + Resistors • Or, get a Rainbow Hat
  4. Requirement 3: Audio (In & Out) • Speaker + Mic

    (if needed, use a 2 to 1 plug) • Protip: Search for “office conference room speakerphones”
  5. Flash it • For NXP devices, fastboot flash (like you

    flash Nexus/Motorola devices) • For Raspberry, flash SD Card with Etcher
  6. Wait a sec . . . Runtime permissions ? •

    Normal Permissions = At install time • Dangerous Permissions = After device reboot • No runtime dialog boxes (duh, no display)
  7. Basic Electronics supported • GPIO – Digital Inputs and Outputs

    • PWM – (Fake) Analog Inputs and Outputs • Serial Communication – I2C (Synchronous, Low Speed, 2-wire) – SPI (Synchronous, HighSpeed, multi-wire) – UART (Asynchronous, Only 1 peripheral)
  8. Weighing Pros and Cons of Android Things • We get

    > 50% of powerful Android Stack • Code sharing with Android applications • Easier to attach ad-hoc UI • Future: Easy delivery via Play Store • Google Backing (duh!) • Uses a lot of resources (vs Linux Kernel + C/Cpp bin) • Dodgy async and multi- threading (electronics are always sync) • Can make similar projects using JS libs in < 5% code • High code complexity trap