Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Android ThingsでIoT/AIなデバイス開発しよう
Search
masato-ka
August 20, 2018
1
720
Android ThingsでIoT/AIなデバイス開発しよう
masato-ka
August 20, 2018
Tweet
Share
More Decks by masato-ka
See All by masato-ka
Azure MLで試して学ぶAIによる自動走行とAIの仕組みハンズオン
masatoka
2
510
Azureで試して学ぶAI CAR自動走行の仕組みハンズオン
masatoka
0
460
JetsonNanoで動く深層強化学習を使ったラジコン向け自動運転ソフトウェアの紹介
masatoka
1
1.4k
Visual Studio Codeで始めるWio LTE
masatoka
0
1.8k
非接触温度センサのデータをLagoonで可視化
masatoka
0
1.5k
AndroidThingsのドライバーの話
masatoka
0
250
AndroidThingsでAI X IoT
masatoka
0
1.4k
Azure SORACOM Futabaのサーボで金賞もらった話
masatoka
0
420
生活をUP!させるIoTサービスLift!
masatoka
1
2.3k
Featured
See All Featured
How to train your dragon (web standard)
notwaldorf
88
5.7k
A better future with KSS
kneath
238
17k
Bash Introduction
62gerente
608
210k
Speed Design
sergeychernyshev
25
670
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Side Projects
sachag
452
42k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
RailsConf 2023
tenderlove
29
940
How GitHub (no longer) Works
holman
311
140k
Statistics for Hackers
jakevdp
796
220k
Building an army of robots
kneath
302
44k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
Transcript
Android ThingsͰIoT/AIͳ σόΠε։ൃ͠·͠ΐ͏ɻ 2018/08/20 @masato_ka(·͞ͱ͔)
ࠓͷLTͷ༰ Android ThingsΛ͏ͱخ͜͠ ͱͰ͢ɻ
Android Thingsͬͯͳʹʁ • Android(Android O)ϕʔεʹIoTσόΠε͚ʹΧελϚ Πζͨ͠OS • ̎̌̍̔ 5݄ʹVer 1.0.0ʢ8݄Ͱ
Ver1.0.3ʣ • Things Support LibraryͰσόΠεͷपล I/OʹΞΫηεͰ͖Δɻ • ΠϯετʔϧͰ͖ΔΞϓϦ1ͭͰΞϓϦέʔγϣϯ͕ࣗಈىಈ͢Δɻ • Raspberry Pi 3BͳͲෳͷϘʔυʹରԠ͍ͯ͠Δɻ • LenovoͷSmart Display͕Android Things 1.0.0ൃͷϓϩμΫτ ༻్: Raspberry PiͰ࡞ΕΔσόΠεେମ࡞ΕΔɻ
AndroidThingsͬͯΔਓ͋Μ·Γฉ͔ͳ͍ɻ •Android Thingsɻɻɻ ※Arduinoѹత͗͢ΔͨΊআ֎
ʲࠓͷϞνϕʔγϣϯʳ ̍ɽAndroid Thingsͷ͍͍ͱ͜Λͬͱͬͯʂ ̎ɽAndroid ThingsΛ͏ਓΛ૿͍ͨ͠
ͰɺAndroid ThingsΛ͏ͱԿ͕خ͍͠ͷʁ
Android Things ͷ࠷ߴͳ3ͭͷϙΠϯτ 1. User-space driver •ಠࣗͷσόΠεΛAndroidͷAPIʹ౷߹ 2. σόΠεͷAIͷΈࠐΈ •ΠϯελϯτʹAIػೳΛσόΠεʹՃ
3. Ϋϥυͱͷ࿈ܞ •σόΠεϚωδϝϯτؚΊͨΫϥυ࿈ܞ
पลI/OΛAndroidͷAPIͰѻ͑ΔΑ͏ʹ͢Δɻ Android Things OS UART I2C/SPI PWM I/O 1.User-space driver
GPSϞδϡʔϧ ηϯα/LED/OLED ϥδίϯαʔϘ SW/LED ※I2SAudio APIͰΞΫηε͢Δɻ Things Support Library Location HID Sensor LoWPAN Location API View Sensor LoWPAN User-space driver AndroidAPI User application
SPIଓλονεΫϦʔϯͷHIDυϥΠόΛ࣮ • SPIͷೖྗͰ͋ͬͯAndroidͷը໘࣮ͱͯ͠ѻ͑Δɻ
User-space driverͷ࠷ߴͳϙΠϯτ • ΞϓϦέʔγϣϯͷϙʔλϏϦςΟΛߴΊΔɻ खࠒͳσόΠε͕ͳ͍ʂ AndroidͰཁ݅ݕ౼ Android ThingsͰ ϓϩτλΠϐϯά ηϯαͰԿΛܭଌʁ
Ϋϥυଆͱ ͷػೳ୲ ௨৴ํࣜʁ ϢʔβώΞͷ ϞοΫ ΞϓϦྲྀ༻ͯ͠ཁ݅ʹ͋ͬ ͨϋʔυΣΞΛ࡞Δɻ ͋ΓͷͰσόΠε։ൃΛޮతʹਐΊΒΕΔɻ
• Android ThingsͷAITensorflow-Lite͔FirebaseML Kit Λར༻Ͱ͖Δɻ 2.σόΠεͷAIͷΈࠐΈ Android Things DNN Model
User Application ɾInception-v3 ɾmobilenet ɾmobilenet-ssd ɾFirebase (Mobile͚ͷBaaS) ɾAndroid Things͔Βར༻Մೳ TensorFlow LiteΛ͏͚ͩͳΒ RaspbianͰͰ͖Δɻ
AIػೳͷ࠷ߴͳϙΠϯτ • Firebase ML KitͰΤοδAIΛ؆୯࣮ݱ&ӡ༻·ͰΧόʔ 1. ̑छྨͷೝࣝػೳͱΧελϜϞσϧ(tfliteܗࣜ) • ςΩετೝࣝɺإ/ಛࣝผɺQRίʔυ2࣍ݩόʔίʔυɺը૾ͷϥϕ Ϧϯά(γʔϯೝࣝ)ɺϥϯυϚʔΫൃݟ(౦ژλϫʔͱ͔)ɺΧελϜϞσ
ϧ(tflite) 2. DNNϞσϧͷཧ৴͕ߦ͑Δɻ • Ϟσϧ͚ͩΛωοτϫʔΫӽ͠ʹߋ৽Ͱ͖Δɻ ※ TPU(GoogleͷAI͚ASIC)ʹରԠ༧ఆ
3. Ϋϥυͱͷ࿈ܞ •Cloud IoT CoreͷΫϥΠΞϯτϥΠϒϥϦ • Cloud IoT CoreΛىʹGCPͱଓͰ͖Δɻ •Android
Things Console • Android ThingsͷOSΞϓϦͷཧΛ͢ΔαʔϏε Ҿ༻ɿhttps://developers-jp.googleblog.com/2018/07/android-things-client-library-for.html
Ϋϥυ࿈ܞͷ࠷ߴͳϙΠϯτ •GCPͷଓ͕؆୯ •Cloud IoT CoreϥΠϒϥϦ •σόΠεϚωδϝϯτػೳ͕σϑΥϧτ •OSΞοϓσʔτʢOTAʣ •ΞϓϦέʔγϣϯͷ৴ʢOTAʣ σόΠεͷσʔλૹ৴ͱσόΠεϚωδϝϯτ
ͦ͏ݴͬͯਏ͍ͱ͜Ζ͋ΔΜͰ͠ΐʁ
Android Thingsͷਏ͍ϙΠϯτ
Android Thingsͷਏ͍ϙΠϯτ • Androidʹؔ͢ΔࣝΛڧཁͯ͘͠Δɻ • ͍ʹAndroidͷάάϥϏϦςΟߴ͍ɻάάΕͳΜͱ͔ͳΔɻ • JavaͰ։ൃ͢ΔͷͩΔ͍ʢࢲJava͖Ͱ͢ʣ • Android
Studio(InteliJ IDEA)ͷ͍ํΛ֮͑Δͱָ͘͠ͳΔɻ • Ͳ͏ͯ͠ݏͳΒKotolin • ରԠϋʔυΣΞ • ݸਓͰ࣮࣭Rspberry Pi 3B Ұɺ3B+ૣ͘དྷͯ͘Εɻ • ηΩϡϦςΟ • ϓϩμΫτʹ͢Δʹϙʔτดͨ͡ΓϢʔβݖݶઃఆͨ͠Γɻ • ଞͷϘʔυಉͩ͡ͱࢥ͏ɻ • Thingsࣗͷใ͕·ͩ·ͩগͳ͍ɻ • ΈΜͳͰͬͯΤίγεςϜ࡞͍͖ͬͯ·ͤΜʁ • ύΠΦχΞਫ਼ਆͰऔΓΊΔɻ
Android Things CAMP #2 (2018/08/26) • গ͠ͰڵຯΛ࣋ͬͨΒੋඇࢀՃ͍ͩ͘͞ʂ(͘͘ձͰ͢) • νϡʔτϦΞϧ·Ͱ͓͖߹͍͠·͢ɻ •
Android ΤϯδχΞ͓ͪͯ͠·͢ɻ(࣮)
͓͠·͍ ※ৄࡉhttp://masato-ka.hatenablog.com/entry/2018/07/22/202525