{"id":1004,"date":"2017-05-01T12:48:57","date_gmt":"2017-05-01T12:48:57","guid":{"rendered":"http:\/\/guoh.ai\/lifelog\/?p=1004"},"modified":"2017-05-01T12:55:20","modified_gmt":"2017-05-01T12:55:20","slug":"hello-world-android-things","status":"publish","type":"post","link":"https:\/\/guoh.ai\/lifelog\/2017\/05\/hello-world-android-things\/","title":{"rendered":"Hello World Android Things"},"content":{"rendered":"<p>\u7269\u8054\u7f51 IoT(Internet of things) \u4e00\u4e2a\u542c\u8d77\u6765\u9ad8\u5927\u4e0a\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u662f\u5386\u53f2\u60a0\u4e45\u4e1c\u897f\uff0c\u4f46\u662f\u968f\u7740\u793e\u4f1a\/\u79d1\u6280\u7684\u53d1\u5c55(\u7f51\u7edc\uff0c\u534f\u8bae\uff0c\u8bbe\u5907\u7b49\u7b49\u5171\u540c\u7684\u53d1\u5c55)\uff0c\u8fd1\u4e9b\u5e74\u88ab\u6b63\u5f0f\u547d\u540d\u4e86\u3002<\/p>\n<p>\u4ee5\u524d\u5f00\u53d1\u8fd9\u7c7b\u7684\u4ea7\u54c1\u90fd\u9700\u8981\u590d\u6742\u7684\u6d41\u7a0b\uff0c\u6bd4\u5982\u5382\u5546\u57fa\u4e8e\u67d0\u6b3e\u7279\u5b9a\u7684\u786c\u4ef6\uff0c\u79fb\u690d\u67d0\u4e2a\u5d4c\u5165\u5f0f\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7136\u540e\u5728\u4e0a\u9762\u5f00\u53d1\u5b9a\u5236\u5316\u7684\u7a0b\u5e8f\uff0c\u53ef\u80fd\u9700\u8981\u61c2\u4e9b\u5e95\u5c42\u7684\u4e1c\u897f\uff0c\u6bd4\u5982\u9a71\u52a8\u7a0b\u5e8f\u7b49\u7b49\uff0c\u800c\u4e14\u8fd0\u884c\u8d44\u6e90\u90fd\u76f8\u5bf9\u6765\u8bf4\u5f88\u6709\u9650\u3002<\/p>\n<p>\u4f46\u662f Google \u67d0\u4e00\u5929\u5ba3\u5e03\u4e86\u4e00\u4e2a\u53eb\u505a <a href=\"https:\/\/developer.android.com\/things\/index.html\" target=\"_blank\">Android Things<\/a> \u7684\u4e1c\u897f\uff0c\u597d\u50cf\u5f88\u591a\u4e8b\u60c5\u90fd\u53d8\u7684\u7b80\u5355\u4e9b\u4e86\u3002<\/p>\n<p>\u8fd9\u91cc\u5c31\u4e0d\u4ecb\u7ecd\u4e86\uff0c\u76f4\u63a5\u5165\u95e8\uff0c\u8bb0\u5f55\u600e\u4e48\u8ba9\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\u5982\u4f55\u8dd1\u8d77\u6765\u3002<\/p>\n<p>1) \u786c\u4ef6\u8bbe\u5907 <a href=\"https:\/\/www.raspberrypi.org\/products\/raspberry-pi-3-model-b\/\" target=\"_blank\">RASPBERRY PI 3 MODEL B<\/a><\/p>\n<p>\u6211\u4e2a\u4eba\u6bd4\u8f83\u559c\u6b22\u8fd9\u6b3e\u6027\u4ef7\u6bd4\u9ad8\u7684\u786c\u4ef6\u8bbe\u5907\uff0c\u81ea\u5df1\u4e70\u8fc7\u4e00\u4e9b\u5f00\u53d1\u677f\uff0c\u8fd9\u4e2a\u5b8c\u5168\u4e0d\u5fc3\u75bc ^_^<\/p>\n<p>\u4e0d\u7ba1\u662f\u4e8c\u624b\u7684\uff0c\u8fd8\u662f\u65b0\u7684\uff0c\u53ea\u8981\u578b\u53f7\u5bf9\u7684\uff0c\u4e70\u4e2a\u5c31\u597d\u4e86(\u4ee5\u524d\u6211\u4e5f\u5f88\u7ea0\u7ed3\u662f\u4e70\u539f\u4ea7\u56fd\u8fd8\u662f\u4e70\u56fd\u4ea7\u7684\uff0c\u540e\u6765\u5c31\u9009\u62e9\u4e70\u4fbf\u5b9c\u7684)<\/p>\n<p>2) \u64cd\u4f5c\u7cfb\u7edf <a href=\"https:\/\/developer.android.com\/things\/index.html\" target=\"_blank\">Android Things<\/a><\/p>\n<p>https:\/\/developer.android.com\/things\/hardware\/raspberrypi.html<\/p>\n<p>\u4e0b\u8f7d\u955c\u50cf(https:\/\/developer.android.com\/things\/preview\/download.html)\uff0c\u70e7\u5f55\u5230 Micro SD Card \u4e0a\uff0c\u5177\u4f53\u529e\u6cd5\u7f51\u4e0a\u641c\u7d22(\u6211\u8fd9\u91cc\u65e7\u7269\u5229\u7528\uff0c\u7ffb\u51fa\u6765\u539f\u6765 Motorola Milestone \u4e0a\u7684\u4e00\u5f20\u5361)\u3002\u5236\u4f5c\u5b8c\u6bd5\u4e4b\u540e\u5c31\u53ef\u4ee5\u63d2\u7535\u5f00\u673a(USB \u4f9b\u7535\uff0cHDMI \u89c6\u9891\u8f93\u51fa\uff0cHDMI \u4e5f\u53ef\u4ee5\u63d0\u4f9b\u4f9b\u7535)\u3002<\/p>\n<p>\u5f00\u673a\u4e4b\u540e\u7684\u753b\u9762<br \/>\n<a href=\"http:\/\/guoh.ai\/lifelog\/wp-content\/uploads\/2017\/05\/at-iot-home.jpg\" rel=\"attachment wp-att-1005\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/guoh.ai\/lifelog\/wp-content\/uploads\/2017\/05\/at-iot-home.jpg\" alt=\"at-iot-home\" width=\"2010\" height=\"1182\" class=\"alignnone size-full wp-image-1005\" \/><\/a><\/p>\n<p>RASPBERRY PI 3 MODEL B \u652f\u6301\u65e0\u7ebf\u7f51\u7edc\u548c\u6709\u7ebf\u7f51\u7edc\uff0c\u5f00\u53d1\u8c03\u8bd5 adb \u652f\u6301\u65e0\u7ebf\u548c\u6709\u7ebf<\/p>\n<p>\u6211\u8fd9\u91cc\u4f7f\u7528\u7684\u662f macOS<\/p>\n<p>\u67e5\u770b\u63a5\u5165\u7684 SD Card \u6302\u8f7d\u4f4d\u7f6e<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">diskutil list<\/pre>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">sudo dd bs=1m if=iot_rpi3.img of=\/dev\/disk3<\/pre>\n<p>\u5177\u4f53\u6587\u4ef6\u540d\u548c\u6302\u8f7d\u4f4d\u7f6e\u6839\u636e\u5b9e\u9645\u60c5\u51b5\u4fee\u6539<\/p>\n<p>3) \u5f00\u53d1\u7a0b\u5e8f<\/p>\n<p>https:\/\/developer.android.com\/things\/sdk\/samples.html<\/p>\n<p>\u63a8\u51fa Android Things \u7684\u610f\u56fe\u5c31\u662f\u7269\u8054\u7f51\u4f1a\u7206\u53d1\u8d77\u6765(\u867d\u7136\u76ee\u524d\u8fd8\u4e0d\u786e\u5207\u77e5\u9053\u4ec0\u4e48\u65f6\u5019)\uff0c\u6240\u4ee5\u5f00\u53d1\u7a0b\u5e8f\u5fc5\u987b\u8981\u7b80\u5355\u5feb\u901f\u3002\u6700\u7b80\u5355\u7684\u770b\u4e0b\u672c Sample \u5c31\u597d\u4e86\u3002<\/p>\n<p>\u672c\u7a0b\u5e8f\u548c\u666e\u901a\u7684 Android \u7a0b\u5e8f\u914d\u7f6e\u4e0a\u5dee\u522b\u4e0d\u5927\uff0c\u5c31\u662f\u65b0\u5efa\u4e00\u4e2a\u6807\u51c6\u7684 Phone\/Tablet \u9879\u76ee\u5c31\u597d\uff0c\u4e3b\u8981\u5728 app\/build.gradle \u548c AndroidManifest.xml \u5f53\u4e2d\u6709\u70b9\u5dee\u522b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7269\u8054\u7f51 IoT(Internet of things) \u4e00\u4e2a\u542c\u8d77\u6765\u9ad8\u5927\u4e0a\uff0c\u4f46\u662f\u5b9e\u9645\u4e0a\u662f\u5386\u53f2\u60a0\u4e45\u4e1c\u897f\uff0c\u4f46\u662f\u968f\u7740\u793e\u4f1a\/\u79d1\u6280\u7684\u53d1\u5c55(\u7f51\u7edc\uff0c\u534f\u8bae\uff0c\u8bbe\u5907\u7b49\u7b49\u5171\u540c\u7684\u53d1\u5c55)\uff0c\u8fd1\u4e9b\u5e74\u88ab\u6b63\u5f0f\u547d\u540d\u4e86\u3002 \u4ee5\u524d\u5f00\u53d1\u8fd9\u7c7b\u7684\u4ea7\u54c1\u90fd\u9700\u8981\u590d\u6742\u7684\u6d41\u7a0b\uff0c\u6bd4\u5982\u5382\u5546\u57fa\u4e8e\u67d0\u6b3e\u7279\u5b9a\u7684\u786c\u4ef6\uff0c\u79fb\u690d\u67d0\u4e2a\u5d4c\u5165\u5f0f\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7136\u540e\u5728\u4e0a\u9762\u5f00\u53d1\u5b9a\u5236\u5316\u7684\u7a0b\u5e8f\uff0c\u53ef\u80fd\u9700\u8981\u61c2\u4e9b\u5e95\u5c42\u7684\u4e1c\u897f\uff0c\u6bd4\u5982\u9a71\u52a8\u7a0b\u5e8f\u7b49\u7b49\uff0c\u800c\u4e14\u8fd0\u884c\u8d44\u6e90\u90fd\u76f8\u5bf9\u6765\u8bf4\u5f88\u6709\u9650\u3002 \u4f46\u662f Google \u67d0\u4e00\u5929\u5ba3\u5e03\u4e86\u4e00\u4e2a\u53eb\u505a Android Things \u7684\u4e1c\u897f\uff0c\u597d\u50cf\u5f88\u591a\u4e8b\u60c5\u90fd\u53d8\u7684\u7b80\u5355\u4e9b\u4e86\u3002 \u8fd9\u91cc\u5c31\u4e0d\u4ecb\u7ecd\u4e86\uff0c\u76f4\u63a5\u5165\u95e8\uff0c\u8bb0\u5f55\u600e\u4e48\u8ba9\u7b2c\u4e00\u4e2a\u7a0b\u5e8f\u5982\u4f55\u8dd1\u8d77\u6765\u3002 1) \u786c\u4ef6\u8bbe\u5907 RASPBERRY PI 3 MODEL B \u6211\u4e2a\u4eba\u6bd4\u8f83\u559c\u6b22\u8fd9\u6b3e\u6027\u4ef7\u6bd4\u9ad8\u7684\u786c\u4ef6\u8bbe\u5907\uff0c\u81ea\u5df1\u4e70\u8fc7\u4e00\u4e9b\u5f00\u53d1\u677f\uff0c\u8fd9\u4e2a\u5b8c\u5168\u4e0d\u5fc3\u75bc ^_^ \u4e0d\u7ba1\u662f\u4e8c\u624b\u7684\uff0c\u8fd8\u662f\u65b0\u7684\uff0c\u53ea\u8981\u578b\u53f7\u5bf9\u7684\uff0c\u4e70\u4e2a\u5c31\u597d\u4e86(\u4ee5\u524d\u6211\u4e5f\u5f88\u7ea0\u7ed3\u662f\u4e70\u539f\u4ea7\u56fd\u8fd8\u662f\u4e70\u56fd\u4ea7\u7684\uff0c\u540e\u6765\u5c31\u9009\u62e9\u4e70\u4fbf\u5b9c\u7684) 2) \u64cd\u4f5c\u7cfb\u7edf Android Things https:\/\/developer.android.com\/things\/hardware\/raspberrypi.html \u4e0b\u8f7d\u955c\u50cf(https:\/\/developer.android.com\/things\/preview\/download.html)\uff0c\u70e7\u5f55\u5230 Micro SD Card \u4e0a\uff0c\u5177\u4f53\u529e\u6cd5\u7f51\u4e0a\u641c\u7d22(\u6211\u8fd9\u91cc\u65e7\u7269\u5229\u7528\uff0c\u7ffb\u51fa\u6765\u539f\u6765 Motorola Milestone \u4e0a\u7684\u4e00\u5f20\u5361)\u3002\u5236\u4f5c\u5b8c\u6bd5\u4e4b\u540e\u5c31\u53ef\u4ee5\u63d2\u7535\u5f00\u673a(USB \u4f9b\u7535\uff0cHDMI \u89c6\u9891\u8f93\u51fa\uff0cHDMI \u4e5f\u53ef\u4ee5\u63d0\u4f9b\u4f9b\u7535)\u3002 \u5f00\u673a\u4e4b\u540e\u7684\u753b\u9762 RASPBERRY PI 3 MODEL B \u652f\u6301\u65e0\u7ebf\u7f51\u7edc\u548c\u6709\u7ebf\u7f51\u7edc\uff0c\u5f00\u53d1\u8c03\u8bd5 adb \u652f\u6301\u65e0\u7ebf\u548c\u6709\u7ebf \u6211\u8fd9\u91cc\u4f7f\u7528\u7684\u662f macOS \u67e5\u770b\u63a5\u5165\u7684 SD Card \u6302\u8f7d\u4f4d\u7f6e diskutil &hellip; <a href=\"https:\/\/guoh.ai\/lifelog\/2017\/05\/hello-world-android-things\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Hello World Android Things<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gfmr_meta_descriptions":[],"_gfmr_multilingual_taxonomy_terms":[],"footnotes":""},"categories":[7],"tags":[],"class_list":["post-1004","post","type-post","status-publish","format-standard","hentry","category-android"],"_links":{"self":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/1004","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/comments?post=1004"}],"version-history":[{"count":5,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/1004\/revisions"}],"predecessor-version":[{"id":1010,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/posts\/1004\/revisions\/1010"}],"wp:attachment":[{"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/media?parent=1004"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/categories?post=1004"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/guoh.ai\/lifelog\/wp-json\/wp\/v2\/tags?post=1004"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}