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

How Makers Can Go Pro with Android Things

Ngesa Marvin
November 25, 2017

How Makers Can Go Pro with Android Things

This presentation was given at GDG DevFest Western Kenya 2017, Kisumu on the 25th November 2017. It covers Open Source Hardware and Android Things. It also covers the steps and tools you need to go from your developer kit prototype to fabricating custom boards for your own product. You can now build powerful connected devices that perform Computer Vision and Audio Processing using the Google’s IoT Platform.

Ngesa Marvin

November 25, 2017
Tweet

More Decks by Ngesa Marvin

Other Decks in Technology

Transcript

  1. GDG

  2. If your idea is unique, easily copied and can be

    sold for profit in a local market, it will be.
  3. If your idea is unique, easily copied and can be

    sold for profit in a local market, it will be.
  4. If your idea is unique, easily copied and can be

    sold for profit in a local market, it will be.
  5. If your idea is unique, easily copied and can be

    sold for profit in a local market, it will be.
  6. • Share • Software & Hardware become Open source •

    Patents and Copyrights are not important in Shenzhen. • But, they make something new, Shanzai makes Innovation Shanzhai (山寨) is not about Copying, it is a spirit
  7. David Li SZOIL is a space and platform for worldwide

    makers to communicate and cooperate Xinchejian is the first hackerspace in China.
  8. “Bunnie” Andrew Huang • Famous Hacker & Maker • PhD

    in Electrical Engineering from MIT • Famous Projects: • Novena Open Source Laptop • Reverse Engineering blog: https://www.bunniestudios.com • Wired Future Cities Documentary on Shenzhen
  9. • Founder & CEO Seeed Studio • Electronic Engineer •

    Forbes 30 Under 30 • Worked at Intel as a Designer • Organizer Shenzhen Maker Faire Eric Pan Eric Pan
  10. • Community • Learn • Better Engineer • Focus •

    Innovate Why I Love Open Source Hardware:
  11. AndroidThings Console • Manage your Android Things IoT Product •

    Download and install the latest Android things system image • Build factory images that contain OEM applications along with the system image • Push over-the-air (OTA ) updates
  12. Determining the Need The application of the PCB, such as

    medical or automotive, will often determine the materials in the PCB
  13. • Circuit • Tweezers • Soldering Gun • Components •

    Soldering Station (Iron) What you need:
  14. GPIO PMW I2C SPI UART I2S Peripheral I/O – Low

    Level Access Hardware Intergration
  15. GPIO PMW I2C SPI UART I2S Peripheral I/O – Low

    Level Access Hardware Intergration Button GPS RGB LED Strip PWM Servo Temperature Sensor Capacitive Touch Buttons Peripheral Driver Library - GitHub + many more…
  16. dependencies { provided 'com.google.android.things:androidthings:...' } <application ...> <uses-library android:name="com.google.android.things"/> <activity

    ...> ... <!-- Launch activity automatically on boot --> <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> Home Activity
  17. // Open a peripheral connection PeripheralManagerService service = new PeripheralManagerService();

    Gpio button = service.openGpio(GPIO_PIN_NAME); // Configure the peripheral button.setDirection(Gpio.DIRECTION_IN); button.setEdgeTriggerType(Gpio.EDGE_FALLING); // Attach callback for input events button.registerGpioCallback(new GpioCallback() { @Override public boolean onGpioEdge(Gpio gpio) { Log.i(TAG, "GPIO changed"); // Return true to continue listening to events return true; } }); Simple Peripheral I/O
  18. private GpioCallback callback = new GpioCallback() { @Override public boolean

    onGpioEdge(Gpio gpio) { int keyAction = gpio.getValue() ? KeyEvent.ACTION_DOWN : KeyEvent.ACTION_UP; inputDriver.emit(new KeyEvent[]{ new KeyEvent(keyAction, KeyEvent.KEYCODE_SPACE)}); return true; } }; Button User Driver InputDriver driver = new InputDriver.Builder(InputDevice.SOURCE_CLASS_BUTTON) .setName(DRIVER_NAME) .setVersion(DRIVER_VERSION) .setKeys(new int[]{KeyEvent.KEYCODE_SPACE}) .build(); UserDriverManager.getManager().registerInputDriver(driver);
  19. GPIO PWM I2C I2S SPI Audio Input Sensors Peripheral Driver

    Library Peripheral I/O User Drivers GPS UART
  20. dependencies { compile 'com.google.android.things.contrib:driver-button:...' } ButtonInputDriver inputDriver = new ButtonInputDriver(

    GPIO_PIN_NAME, Button.LogicState.PRESSED_WHEN_LOW , KeyEvent.KEYCODE_SPACE ); inputDriver.register(); Button Library Driver
  21. Google's IoT Developers Community https://g.co/iotdev Android Things SDK https://developer.android.com/things Hackster.io

    Community https://hackster.io/google What’s Next? Ngesa N. Marvin IoT Champion for GDGs, SSA +Ngesa Marvin @Ngesa254 #DevFestWesternKE17