Android Things,
from mobile apps to physical world
Stefano Sanna
ROME - APRIL 13/14 2018
Giovanni Di Gialluca
OUTLINE
• Android State Of The Nation and (quick) history
• Android Things in one slide
• Hardware and software: board and firmware
• Environment: who’s in, who’s out
• Hello Android Things!
• Setup of a project
• Overview of Android Things API
• Merging Mobile & IoT
• Vision and greetings
overview
Android: State of the Nation
Fall 2007: Android is announced!
Fall 2008: T-Mobile G1 lands in the US
2010: Honeycomb on Motorola Xoom
2014: Android Wear and Android TV
2015: Android Auto
2016: Android Things (DP)
Android Things in one slide
Physical
World
Cloud
Well-known stack
Environment
• Same architecture
• Same IDE (Android Studio)
• Same programming languages
• Same framework
• Same app (Activity) lifecycle
• Same UI widgets (UI?)
• Same application packaging
• Same reliable security for apps and firmware upgrade
• Same passionate community
Android vs Android Things: IN & OUT
Cast
Drive
Firebase Analytics
Firebase Cloud Messaging
Firebase Realtime Database
Firebase Remote Config
Firebase Storage
Fit
Instance ID
Location
Nearby
Places
Mobile Vision
CalendarContract
ContactsContract
DocumentsContract
DownloadManager
MediaStore
Settings
Telephony
UserDictionary
VoicemailContract
AdMob
Android Pay
Firebase Authentication, Links, Invites…
Maps
Play Games
Search
Sign-In
SOM: Fast Prototyping to production
Supported board
NXP Pico i.MX7D NXP Pico i.MX6UL Raspberry Pi3 Model B
PRICE $64 $43 $22
SDK PRICE $79 $69 $22
CPU 1 GHz dual-core ARM 500Mhz ARM 1.2GHz quad-core ARM
RAM 512MB 512MB 1GB
STORAGE 4GB eMMC 4GB eMMC microSD
GPU NO NO Videocore
CAMERA CSI-2 NO CSI-2
AUDIO Analog Analog USB 2.0 + Analog
NET Ethernet, WiFi ac, BT 4.1 Ethernet, WiFi n, BT 4.1 Ethernet, WiFi n, BT 4.1
USB USB 2.0 HOST + 2x OTG 2x USB 2.0 OTG 4x USB 2.0 HOST
GPIO 7x UART, 4x I2C, 4x SPI, 2x
CAN, misc GPIO
8x UART, 4x I2C, 4x SPI, misc 48
GPIO
2x UART, 2x I2C, 2x SPI, up to 26
GPIO
Raspberry Pi3 Model B
• Damn cheap!
• Good performances.
• Ethernet + WiFi
• HDMI + Camera
• Lot of extension boards and kits: AI+VR+IoT!
• You’ll never brick it: different configurations can be tested
just swapping the SD. No eMMC.
• Warning: no ADB via USB, a network is strictly required
firmware
Console: Models
Console: Build (bundle)
Console: Build (AT version)
Console: Build (AT version)
Device updates
An UpdateManager utility
class provides a easy way
for the Android Things
board to check if there is a
new update
Device updates
Using the Console, you can easily create new product
releases based on new Android Things versions or new app
versions or both and push them to devices already deployed
hello_things
Hello_things
app/module build.gradle
dependencies {
…
compileOnly 'com.google.android.things:androidthings:+'
}
AndroidManifest.xml
<uses-permission
android:name="com.google.android.things.permission.USE_PERIPHERAL_IO" />
<application>
<uses-library android:name="com.google.android.things" />
<activity android:name=".MainActivity">
<intent-filter>
<!-- Main & Launcher for Android Studio -->
</intent-filter>
<!-- 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>
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PeripheralManager service = PeripheralManager.getInstance();
Log.d("GPIO", service.getGpioList().toString());
Gpio mLedGpio = service.openGpio("BCM26");
mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW);
new Thread(new Runnable() {

public void run() {

for (int i = 0; i < 10; i++) {

try {
mLedGpio.setValue(i % 2 == 0);

Thread.sleep(250);

} catch (Exception e) {/*uh!uh!*/}

}
}
}).start();
}
}
Hello_things
Anode
(longer pin)
330
Ohm
Things support library
Things Support Library
GPIO
PWM
I2C
SPI
I2S
Single-PIN analog/digital I/O
Serial
UART
Pulse-Width-Modulation to control servo
Slow serial bus for sensors
Fast serial bus for boards interconnection
Point-to-Point serial port
Serial bus for audio streaming
Driver Library
From Hardware specs to interface
• By Google
https://github.com/androidthings/contrib-drivers
• By Intel
https://github.com/intel-iot-devkit/android-things-samples
• By us
https://github.com/giovannidg/androidthingsdrivers
https://github.com/gerdavax/BrickPi3_AndroidThings
Change settings programmatically
• ScreenManager
• Brightness,
• Orientation
• TimeManager
• Time format
• Time zone
• Time auto update
• DeviceManager
• Factory reset
• Set system locales
• Reboot
adb shell reboot –p
unplug the power cord is not polite
User Driver
INPUT
SENSOR
GPS
User Driver
AUDIO
Open Source
GPIO
PWM
I2C
SPI
I2S
Serial
UART
Peripheral
Driver
Library
Code Reuse &
Integration
Project structure
Mobile
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
......
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean managed = MyKeyCodes.manageKeyCode(keyCode);
if (managed) return true;
return super.onKeyDown(keyCode, event);
}
}
keycodelib
public class MyKeyCodes {
public static final int VOLUME_UP_KEY = KeyEvent.KEYCODE_VOLUME_UP;
/**
* @param keyCode
* @return true if the event was managed
*/
public static boolean manageKeyCode(int keyCode) {
if (keyCode == VOLUME_UP_KEY) {
Log.d("KEY_LOG", “Ring the bell");
return true; // indicate we handled the event
}
return false;
}
}
Things
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
try {
mInputDriver = new ButtonInputDriver("BCM4",
Button.LogicState.PRESSED_WHEN_LOW,
MyKeyCodes.VOLUME_UP_KEY// the keycode to send
);
mInputDriver.register();
} catch (IOException e) { } // error configuring button...
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean managed = MyKeyCodes.manageKeyCode(keyCode);
if (managed) return true;
return super.onKeyDown(keyCode, event);
}
to infinity and beyond
Tensor Flow
OpenSource library for Machine Learning
§ Developed by Google,
Available For every OS
§ a computational graph is a series of
tensorflow operation (nodes), each EDGE is
a multidimensional data called Tensor
§ Public neural network pre-trained with one
million of images, or you can train your
neural Network with a provided pythOn
library
§ Neural network model for image
recognition called “Inception“ with 1000
categories
BrikPi + Tensorflow
§ SPI to control
motors and sensors
§ TensorFlow for
object recognition
BrikPi
Raspberry Pi3 extension module with:
§ 4 Mindstorms NXT/EV3 Motor ports
§ 4 Mindstorms NXT/EV3 Sensor ports
§ Extra I2C sensor bus
§ SPI interface to Raspberry Pi3
§ Uniform request/response binary protocol
§ Seamless power management (internal, external, both)
Video please!
Android Things
Giovanni Di Gialluca
giovanni.digialluca@gmail.com
https://github.com/giovannidg
www.linkedin.com/in/giovanni-di-gialluca

Stefano «gerdavax» Sanna
gerdavax@gmail.com
@gerdavax
https://www.linkedin.com/in/gerdavax
Grazie :-

More Related Content

PDF
Android Things
PDF
Android things introduction - Development for IoT
PDF
Android Things - The IoT platform for everyone.
PPTX
Zero to one with Android Things - Hieu Hua
PDF
Android Things Linux Day 2017
PPTX
Android Things - The IoT platform from Google
PPTX
Android Things, Alexey Rybakov, Technical Evangelist, DataArt
PDF
Hack the Real World with ANDROID THINGS
Android Things
Android things introduction - Development for IoT
Android Things - The IoT platform for everyone.
Zero to one with Android Things - Hieu Hua
Android Things Linux Day 2017
Android Things - The IoT platform from Google
Android Things, Alexey Rybakov, Technical Evangelist, DataArt
Hack the Real World with ANDROID THINGS

What's hot (19)

PPTX
Decrease build time and application size
PDF
Myths of Angular 2: What Angular Really Is
PDF
Go Green - Save Power
PDF
Intel ndk - a few Benchmarks
PDF
Android on IA devices and Intel Tools
PDF
Intel Graphics Performance Analyzers (Intel GPA)
PDF
Introduction to Android - Mobile Fest Singapore 2009
PDF
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
DOCX
Kinect installation guide
PDF
Kinect on Android Pandaboard
PPTX
NVIDIA SHIELD Launch Event at GDC 2015
PDF
Samsung Indonesia: Tizen Platform Overview and IoT
PDF
ABS 2014 - The Growth of Android in Embedded Systems
PDF
Bringing the Real World Into the Game World
PDF
VR Base Camp: Scaling the Next Major Platform
PPTX
android mario project
PPTX
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
PDF
Creating Touchless HMIs Using Computer Vision for Gesture Interaction
 
PDF
Project Ara
Decrease build time and application size
Myths of Angular 2: What Angular Really Is
Go Green - Save Power
Intel ndk - a few Benchmarks
Android on IA devices and Intel Tools
Intel Graphics Performance Analyzers (Intel GPA)
Introduction to Android - Mobile Fest Singapore 2009
Kubernetes based connected vehicle platform #k8sjp_t1 #k8sjp
Kinect installation guide
Kinect on Android Pandaboard
NVIDIA SHIELD Launch Event at GDC 2015
Samsung Indonesia: Tizen Platform Overview and IoT
ABS 2014 - The Growth of Android in Embedded Systems
Bringing the Real World Into the Game World
VR Base Camp: Scaling the Next Major Platform
android mario project
OWF12/PAUG Conf Days Alternative to google's android emulator, daniel fages, ...
Creating Touchless HMIs Using Computer Vision for Gesture Interaction
 
Project Ara
Ad

Similar to Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni Di Gialluca - Codemotion Rome 2018 (20)

PPTX
KSS Session and Tech Talk-2019 on IOT.pptx
PDF
Android Things in action
PPTX
Build your first android things application
PPTX
Android Things: Quickly Developing for the Internet of Things
PDF
Android Things : Building Embedded Devices
PPTX
Android Things - Solid Foundations
PDF
Android things intro
PDF
Android Things Latest News / Aug 25, 2017
PDF
Sentinel - The First Home Security Robot Powered by Android Things (DroidCon...
PPT
Android Things Getting Started
PPTX
IoT from java perspective
PDF
Linxu conj2016 96boards
PDF
Connecting your phone and home with firebase and android things - James Cogga...
PDF
Android Embedded - Smart Hubs als Schaltzentrale des IoT
PDF
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
PPTX
A brief introduction to making your own (Internet of Things) Thing
PDF
Android Meets A BeagleBone In The IoT World
DOCX
Svsembedded latest embedded_project_list_02_08_2020
PDF
Connect.Tech- Android Development For Arduino 101
ODP
Android things-manchester-2018-jun
KSS Session and Tech Talk-2019 on IOT.pptx
Android Things in action
Build your first android things application
Android Things: Quickly Developing for the Internet of Things
Android Things : Building Embedded Devices
Android Things - Solid Foundations
Android things intro
Android Things Latest News / Aug 25, 2017
Sentinel - The First Home Security Robot Powered by Android Things (DroidCon...
Android Things Getting Started
IoT from java perspective
Linxu conj2016 96boards
Connecting your phone and home with firebase and android things - James Cogga...
Android Embedded - Smart Hubs als Schaltzentrale des IoT
Presentation for IoT workshop at Sinhagad University (Feb 4, 2016) - 2/2
A brief introduction to making your own (Internet of Things) Thing
Android Meets A BeagleBone In The IoT World
Svsembedded latest embedded_project_list_02_08_2020
Connect.Tech- Android Development For Arduino 101
Android things-manchester-2018-jun
Ad

More from Codemotion (20)

PDF
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
PDF
Pompili - From hero to_zero: The FatalNoise neverending story
PPTX
Pastore - Commodore 65 - La storia
PPTX
Pennisi - Essere Richard Altwasser
PPTX
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
PPTX
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
PPTX
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
PPTX
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
PDF
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
PDF
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
PDF
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
PDF
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
PDF
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
PDF
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
PPTX
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
PPTX
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
PDF
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
PDF
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
PDF
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
PDF
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019
Fuzz-testing: A hacker's approach to making your code more secure | Pascal Ze...
Pompili - From hero to_zero: The FatalNoise neverending story
Pastore - Commodore 65 - La storia
Pennisi - Essere Richard Altwasser
Michel Schudel - Let's build a blockchain... in 40 minutes! - Codemotion Amst...
Richard Süselbeck - Building your own ride share app - Codemotion Amsterdam 2019
Eward Driehuis - What we learned from 20.000 attacks - Codemotion Amsterdam 2019
Francesco Baldassarri - Deliver Data at Scale - Codemotion Amsterdam 2019 -
Martin Förtsch, Thomas Endres - Stereoscopic Style Transfer AI - Codemotion A...
Melanie Rieback, Klaus Kursawe - Blockchain Security: Melting the "Silver Bul...
Angelo van der Sijpt - How well do you know your network stack? - Codemotion ...
Lars Wolff - Performance Testing for DevOps in the Cloud - Codemotion Amsterd...
Sascha Wolter - Conversational AI Demystified - Codemotion Amsterdam 2019
Michele Tonutti - Scaling is caring - Codemotion Amsterdam 2019
Pat Hermens - From 100 to 1,000+ deployments a day - Codemotion Amsterdam 2019
James Birnie - Using Many Worlds of Compute Power with Quantum - Codemotion A...
Don Goodman-Wilson - Chinese food, motor scooters, and open source developmen...
Pieter Omvlee - The story behind Sketch - Codemotion Amsterdam 2019
Dave Farley - Taking Back “Software Engineering” - Codemotion Amsterdam 2019
Joshua Hoffman - Should the CTO be Coding? - Codemotion Amsterdam 2019

Recently uploaded (20)

PPTX
Microsoft User Copilot Training Slide Deck
PDF
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
PDF
Data Virtualization in Action: Scaling APIs and Apps with FME
PDF
NewMind AI Weekly Chronicles – August ’25 Week IV
PDF
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
PDF
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
PPTX
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
PDF
Advancing precision in air quality forecasting through machine learning integ...
PDF
Early detection and classification of bone marrow changes in lumbar vertebrae...
PDF
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
PPTX
Training Program for knowledge in solar cell and solar industry
PDF
Comparative analysis of machine learning models for fake news detection in so...
PPTX
future_of_ai_comprehensive_20250822032121.pptx
PDF
Lung cancer patients survival prediction using outlier detection and optimize...
PDF
Electrocardiogram sequences data analytics and classification using unsupervi...
PDF
Auditboard EB SOX Playbook 2023 edition.
PDF
Introduction to MCP and A2A Protocols: Enabling Agent Communication
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
PPTX
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx
Microsoft User Copilot Training Slide Deck
CXOs-Are-you-still-doing-manual-DevOps-in-the-age-of-AI.pdf
Data Virtualization in Action: Scaling APIs and Apps with FME
NewMind AI Weekly Chronicles – August ’25 Week IV
Transform-Your-Streaming-Platform-with-AI-Driven-Quality-Engineering.pdf
Planning-an-Audit-A-How-To-Guide-Checklist-WP.pdf
AI-driven Assurance Across Your End-to-end Network With ThousandEyes
Advancing precision in air quality forecasting through machine learning integ...
Early detection and classification of bone marrow changes in lumbar vertebrae...
IT-ITes Industry bjjbnkmkhkhknbmhkhmjhjkhj
Training Program for knowledge in solar cell and solar industry
Comparative analysis of machine learning models for fake news detection in so...
future_of_ai_comprehensive_20250822032121.pptx
Lung cancer patients survival prediction using outlier detection and optimize...
Electrocardiogram sequences data analytics and classification using unsupervi...
Auditboard EB SOX Playbook 2023 edition.
Introduction to MCP and A2A Protocols: Enabling Agent Communication
Improvisation in detection of pomegranate leaf disease using transfer learni...
“The Future of Visual AI: Efficient Multimodal Intelligence,” a Keynote Prese...
agenticai-neweraofintelligence-250529192801-1b5e6870.pptx

Android Things, from mobile apps to physical world - Stefano Sanna - Giovanni Di Gialluca - Codemotion Rome 2018

  • 1. Android Things, from mobile apps to physical world Stefano Sanna ROME - APRIL 13/14 2018 Giovanni Di Gialluca
  • 2. OUTLINE • Android State Of The Nation and (quick) history • Android Things in one slide • Hardware and software: board and firmware • Environment: who’s in, who’s out • Hello Android Things! • Setup of a project • Overview of Android Things API • Merging Mobile & IoT • Vision and greetings
  • 4. Android: State of the Nation
  • 5. Fall 2007: Android is announced!
  • 6. Fall 2008: T-Mobile G1 lands in the US
  • 7. 2010: Honeycomb on Motorola Xoom
  • 8. 2014: Android Wear and Android TV
  • 11. Android Things in one slide Physical World Cloud
  • 13. Environment • Same architecture • Same IDE (Android Studio) • Same programming languages • Same framework • Same app (Activity) lifecycle • Same UI widgets (UI?) • Same application packaging • Same reliable security for apps and firmware upgrade • Same passionate community
  • 14. Android vs Android Things: IN & OUT Cast Drive Firebase Analytics Firebase Cloud Messaging Firebase Realtime Database Firebase Remote Config Firebase Storage Fit Instance ID Location Nearby Places Mobile Vision CalendarContract ContactsContract DocumentsContract DownloadManager MediaStore Settings Telephony UserDictionary VoicemailContract AdMob Android Pay Firebase Authentication, Links, Invites… Maps Play Games Search Sign-In
  • 15. SOM: Fast Prototyping to production
  • 16. Supported board NXP Pico i.MX7D NXP Pico i.MX6UL Raspberry Pi3 Model B PRICE $64 $43 $22 SDK PRICE $79 $69 $22 CPU 1 GHz dual-core ARM 500Mhz ARM 1.2GHz quad-core ARM RAM 512MB 512MB 1GB STORAGE 4GB eMMC 4GB eMMC microSD GPU NO NO Videocore CAMERA CSI-2 NO CSI-2 AUDIO Analog Analog USB 2.0 + Analog NET Ethernet, WiFi ac, BT 4.1 Ethernet, WiFi n, BT 4.1 Ethernet, WiFi n, BT 4.1 USB USB 2.0 HOST + 2x OTG 2x USB 2.0 OTG 4x USB 2.0 HOST GPIO 7x UART, 4x I2C, 4x SPI, 2x CAN, misc GPIO 8x UART, 4x I2C, 4x SPI, misc 48 GPIO 2x UART, 2x I2C, 2x SPI, up to 26 GPIO
  • 17. Raspberry Pi3 Model B • Damn cheap! • Good performances. • Ethernet + WiFi • HDMI + Camera • Lot of extension boards and kits: AI+VR+IoT! • You’ll never brick it: different configurations can be tested just swapping the SD. No eMMC. • Warning: no ADB via USB, a network is strictly required
  • 21. Console: Build (AT version)
  • 22. Console: Build (AT version)
  • 23. Device updates An UpdateManager utility class provides a easy way for the Android Things board to check if there is a new update
  • 24. Device updates Using the Console, you can easily create new product releases based on new Android Things versions or new app versions or both and push them to devices already deployed
  • 26. Hello_things app/module build.gradle dependencies { … compileOnly 'com.google.android.things:androidthings:+' } AndroidManifest.xml <uses-permission android:name="com.google.android.things.permission.USE_PERIPHERAL_IO" /> <application> <uses-library android:name="com.google.android.things" /> <activity android:name=".MainActivity"> <intent-filter> <!-- Main & Launcher for Android Studio --> </intent-filter> <!-- 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>
  • 27. public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); PeripheralManager service = PeripheralManager.getInstance(); Log.d("GPIO", service.getGpioList().toString()); Gpio mLedGpio = service.openGpio("BCM26"); mLedGpio.setDirection(Gpio.DIRECTION_OUT_INITIALLY_LOW); new Thread(new Runnable() {
 public void run() {
 for (int i = 0; i < 10; i++) {
 try { mLedGpio.setValue(i % 2 == 0);
 Thread.sleep(250);
 } catch (Exception e) {/*uh!uh!*/}
 } } }).start(); } } Hello_things Anode (longer pin) 330 Ohm
  • 29. Things Support Library GPIO PWM I2C SPI I2S Single-PIN analog/digital I/O Serial UART Pulse-Width-Modulation to control servo Slow serial bus for sensors Fast serial bus for boards interconnection Point-to-Point serial port Serial bus for audio streaming
  • 30. Driver Library From Hardware specs to interface • By Google https://github.com/androidthings/contrib-drivers • By Intel https://github.com/intel-iot-devkit/android-things-samples • By us https://github.com/giovannidg/androidthingsdrivers https://github.com/gerdavax/BrickPi3_AndroidThings
  • 31. Change settings programmatically • ScreenManager • Brightness, • Orientation • TimeManager • Time format • Time zone • Time auto update • DeviceManager • Factory reset • Set system locales • Reboot adb shell reboot –p unplug the power cord is not polite
  • 32. User Driver INPUT SENSOR GPS User Driver AUDIO Open Source GPIO PWM I2C SPI I2S Serial UART Peripheral Driver Library
  • 35. Mobile public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { ...... } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { boolean managed = MyKeyCodes.manageKeyCode(keyCode); if (managed) return true; return super.onKeyDown(keyCode, event); } }
  • 36. keycodelib public class MyKeyCodes { public static final int VOLUME_UP_KEY = KeyEvent.KEYCODE_VOLUME_UP; /** * @param keyCode * @return true if the event was managed */ public static boolean manageKeyCode(int keyCode) { if (keyCode == VOLUME_UP_KEY) { Log.d("KEY_LOG", “Ring the bell"); return true; // indicate we handled the event } return false; } }
  • 37. Things @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { mInputDriver = new ButtonInputDriver("BCM4", Button.LogicState.PRESSED_WHEN_LOW, MyKeyCodes.VOLUME_UP_KEY// the keycode to send ); mInputDriver.register(); } catch (IOException e) { } // error configuring button... } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { boolean managed = MyKeyCodes.manageKeyCode(keyCode); if (managed) return true; return super.onKeyDown(keyCode, event); }
  • 38. to infinity and beyond
  • 39. Tensor Flow OpenSource library for Machine Learning § Developed by Google, Available For every OS § a computational graph is a series of tensorflow operation (nodes), each EDGE is a multidimensional data called Tensor § Public neural network pre-trained with one million of images, or you can train your neural Network with a provided pythOn library § Neural network model for image recognition called “Inception“ with 1000 categories
  • 40. BrikPi + Tensorflow § SPI to control motors and sensors § TensorFlow for object recognition
  • 41. BrikPi Raspberry Pi3 extension module with: § 4 Mindstorms NXT/EV3 Motor ports § 4 Mindstorms NXT/EV3 Sensor ports § Extra I2C sensor bus § SPI interface to Raspberry Pi3 § Uniform request/response binary protocol § Seamless power management (internal, external, both)
  • 43. Android Things Giovanni Di Gialluca [email protected] https://github.com/giovannidg www.linkedin.com/in/giovanni-di-gialluca
 Stefano «gerdavax» Sanna [email protected] @gerdavax https://www.linkedin.com/in/gerdavax